Hi,

Thank you for looking into this!

On Fri, 18 Sept 2026 at 15:51, Daniel Gustafsson <[email protected]> wrote:
>
> > On 18 Sep 2026, at 12:26, Nazir Bilal Yavuz <[email protected]> wrote:
> > Problem #1:
> >
> > We wait for the primary's insert LSN in three places, but the primary
> > might be idle and not have sent it yet:
>
> Makes sense.
>
> -$node_a->wait_for_catchup($node_b, 'replay', $node_a->lsn('insert'));
> +# Backup completion has flushed the required WAL.
> +$node_a->wait_for_catchup($node_b, 'replay', $node_a->lsn('flush'));
>
> In these cases, couldn't we just wait for the replay LSN, ie the default for
> wait_for_catchup?

Sorry, I am a bit confused. AFAIU, you meant:

$node_a->wait_for_catchup($node_b);

which is

$node_a->wait_for_catchup($node_b, 'replay', $node_a->lsn('write'));

If that is the case, could we still need to wait for an additional
primary-side flush, since written WAL might not have been flushed yet?
I understand that this might not cause the same long delay as waiting
for the insert LSN. On my local, ->lsn('write') and ->lsn('flush') are
basically same, they both take ~3 seconds.

My idea was that since the WAL needed by the tests has already been
flushed, I thought that would be enough for the tests. Also, is using
->lsn('write') considered better for these cases or do you recommend
it because of the simplicity?

-- 
Regards,
Nazir Bilal Yavuz
Microsoft


Reply via email to