Re: Reliable WAL file shipping over unreliable network

Поиск
Список
Период
Сортировка
От Nagy László Zsolt
Тема Re: Reliable WAL file shipping over unreliable network
Дата
Msg-id debd4205-e27a-cd9d-9169-6748e65083a2@shopzeus.com
обсуждение исходный текст
Ответ на Re: Reliable WAL file shipping over unreliable network  (Nagy László Zsolt <gandalf@shopzeus.com>)
Ответы Re: Reliable WAL file shipping over unreliable network
Список pgsql-admin
>>> Is there a utility that is widely used for WAL file shipping, and
>>> addresses these problems?
>> rsync
> Should I use rsync with --remove-source-files option? Will that solve
> all problems with unreliable networks?
Another problem with rsync might be that it does not know if a WAL file
on the source side is growing (e.g. being written) and it might start
copy that before it is fully flushed to disk. I see this as a big
problem, but I don't have experience.

My first idea to address this is to execute an archive command something
like this:

test ! -f /pg_wal/%f && cp %p /volume/pg_wal_tmp/%f && mv
/volume/pg_wal_tmp/%f /volume/pg_wal/%f

E.g. move the file into the archive dir only after it has been fully
copied to the destination volume. But then we still have the problem of
partially written files on the slave side.

I can come up with other ideas, but I do not want to reinvent the wheel.
Can somebody please tell me how to deal with partially written WAL files?

Thanks,

  Laszlo



В списке pgsql-admin по дате отправления:

Предыдущее
От: Nagy László Zsolt
Дата:
Сообщение: Re: Reliable WAL file shipping over unreliable network
Следующее
От: scott ribe
Дата:
Сообщение: Re: Reliable WAL file shipping over unreliable network