Re: log shipping with pg_receivewal

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: log shipping with pg_receivewal
Дата
Msg-id Ybgt73w5OujbvGY6@paquier.xyz
обсуждение исходный текст
Ответ на log shipping with pg_receivewal  (Marc Millas <marc.millas@mokadb.com>)
Список pgsql-general
On Tue, Dec 14, 2021 at 05:25:04AM +0100, Marc Millas wrote:
> My question: as the synchronous option is supposed to make pg_receivewal
> write transaction immediately in the wal files, is there a way to ask the
> standby to apply them on the fly ie. without waiting a wal file change ?

Nope, there is no such option.  First, pg_receivewal strongly relies
on the rename of WAL segment to its correct name once completed.  If
there is any failure, we would start back at the beginning of the last
partial segment found.

Saying that, you could do things by using a restore_command that
checks after a .partial file directly in the path used by
pg_receivewal to store the archives, and Postgres would repeatedly ask
for a segment once it is out.  But really, this is going to be really
expensive as a restore_command would copy a full file, so that's a lot
of bandwidth wasted away for nothing.  Streaming replication would be
likely your best, and cheapest, option here.
--
Michael

Вложения

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

Предыдущее
От: Marc Millas
Дата:
Сообщение: log shipping with pg_receivewal
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: log shipping with pg_receivewal