Re: Implement waiting for wal lsn replay: reloaded - Mailing list pgsql-hackers

From Xuneng Zhou
Subject Re: Implement waiting for wal lsn replay: reloaded
Date
Msg-id CABPTF7XxDonXAcz6DsN6AUJB3swYrZkJHq3UCDaD3Q2H+j0gUA@mail.gmail.com
Whole thread
In response to pgsql: Fix another empty nbtree index SSI race.  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Implement waiting for wal lsn replay: reloaded
List pgsql-hackers
On Mon, May 25, 2026 at 5:00 PM Alexander Korotkov <aekorotkov@gmail.com> wrote:
>
> On Sat, May 23, 2026 at 9:40 PM Xuneng Zhou <xunengzhou@gmail.com> wrote:
> >> > I agree with you.  But do we actually need a
> >> > wait_for_standby_and_slot_catchup() wrapper.  I think we can call
> >> > $node->wait_for_slot_catchup() directly and simplify the fix.  Check
> >> > the attached patch.
> >> >
> >>
> >> The patch looks good to me. I agree that the wait_for_slot_catchup is
> >> not needed and could be misleading. This change would make the exact
> >> synchronization point and its intention clearer. The only price we
> >> need to pay here is bringing back the polling. But it seems acceptable
> >> since the cost was there in the pre-wait-for-lsn era. And thanks for
> >> writing the great commit message!
> >
> >
> > Sorry for copy-pasting the wrong function name. It should be wait_for_catchup().
>
> Good, thank you.  I'll push it if no objections.

While reading 019_replslot_limit.pl, Codex pointed out a few
inconsistencies in the comments. I verified them and they look real.
Would you mind doing a small cleanup as well?

--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL
Next
From: Amit Kapila
Date:
Subject: Re: Bound memory usage during manual slot sync retries