Re: Allow async standbys wait for sync replication

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Allow async standbys wait for sync replication
Дата
Msg-id CALj2ACV=M6OpY4Ugf8hxa2+=EpRvv_Mh3W93Xr2gBCQLweWn0Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Allow async standbys wait for sync replication  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Sat, Mar 5, 2022 at 1:26 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> My point is that there are existing tools for alerting processes when an
> LSN is synchronously replicated and for waking up WAL senders.  What I am
> proposing wouldn't involve spinning in XLogSendPhysical() waiting for
> synchronous replication.  Like SyncRepWaitForLSN(), we'd register our LSN
> in the queue (SyncRepQueueInsert()), but we wouldn't sit in a separate loop
> waiting to be woken.  Instead, SyncRepWakeQueue() would eventually wake up
> the WAL sender and trigger another iteration of WalSndLoop().

While we continue to discuss the other better design at [1], FWIW, I
would like to share a simpler patch that lets wal senders serving
async standbys wait until sync standbys report the flush lsn.
Obviously this is not an elegant way to solve the problem reported in
this thread, as I have this patch ready long back, I wanted to share
it here.

Nathan, of course, this is not something you wanted.

[1] https://www.postgresql.org/message-id/CALj2ACWCj60g6TzYMbEO07ZhnBGbdCveCrD413udqbRM0O59RA%40mail.gmail.com

Regards,
Bharath Rupireddy.

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Optimize external TOAST storage
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Proposal: Support custom authentication methods using hooks