Re: Allow async standbys wait for sync replication - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Allow async standbys wait for sync replication
Date
Msg-id 20220305202752.4oll4hgztlgdfykl@alap3.anarazel.de
Whole thread Raw
In response to Re: Allow async standbys wait for sync replication  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Allow async standbys wait for sync replication  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
Hi,

On 2022-03-05 14:14:54 +0530, Bharath Rupireddy wrote:
> I understand. Even if we use the SyncRepWaitForLSN approach, the async
> walsenders will have to do nothing in WalSndLoop() until the sync
> walsender wakes them up via SyncRepWakeQueue.

I still think we should flat out reject this approach. The proper way to
implement this feature is to change the protocol so that WAL can be sent to
replicas with an additional LSN informing them up to where WAL can be
flushed. That way WAL is already sent when the sync replicas have acknowledged
receipt and just an updated "flush/apply up to here" LSN has to be sent.

- Andres



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Proposal: Support custom authentication methods using hooks
Next
From: Paul Jungwirth
Date:
Subject: Re: range_agg with multirange inputs