Re: Improve pg_sync_replication_slots() to wait for primary to advance - Mailing list pgsql-hackers

From shveta malik
Subject Re: Improve pg_sync_replication_slots() to wait for primary to advance
Date
Msg-id CAJpy0uCPjkg_dJaFdgZzDVbKgSf8Wg1SMFDwD+0xq2Mfn+4WEw@mail.gmail.com
Whole thread Raw
In response to Re: Improve pg_sync_replication_slots() to wait for primary to advance  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Thu, Mar 5, 2026 at 12:25 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> >
> > patch001 has:
> >
> > -        logical decoding and must be dropped after promotion. See
> > +        logical decoding and must be dropped after promotion. This function
> > +        retries cyclically until all the failover slots that existed on
> > +        primary at the start of the function call are synchronized. See
> >
> > IIUC, this is not completely true though. If the slot is persisted, we
> > do not try cyclically now, we skip the sync. Isn't it?
> >
>
> Right, but even if one of the slots is not persisted, it will try to
> sync again, no?

yes, it will.

>  Shall this be
> > changed to:
> >
> > It retries cyclically until all the failover slots that existed on
> > primary at the start of the function call are persisted and are
> > sync-ready.
> >
>
> This is too internal specific. I find Hou-san's version better w.r.t
> user facing docs.
>

Okay, works for me.

thanks
Shveta



pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Dead code in logical decoding of speculative insertions
Next
From: vignesh C
Date:
Subject: Re: Skipping schema changes in publication