Hi,
On Sat, Aug 15, 2026 at 10:35 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Thu, Aug 13, 2026 at 9:40 PM Bertrand Drouvot
> <bertranddrouvot.pg@gmail.com> wrote:
>
> > Yeah, I agree. Keeping the exemption for idle_replication_slot_timeout but
> > removing it from CanInvalidateXidAgedSlot() makes sense to me.
>
> > Worth adding a test with an actual synced slot, including checking that its
> > invalidation releases the feedback horizon on the primary?
>
> Yes, I will do so. I will turn either one of the following (maybe test
> 2 for determinism) into a test by ensuring that the synced slot on the
> standby gets XID-age invalidated while its corresponding failover slot
> and physical slot on the primary don't get invalidated, and ensure
> that vacuum on the system catalogs doesn't get blocked.
>
> 1/ Slot sync worker stuck or erroring: the synced slot's catalog_xmin
> is old and gets sent onto the physical slot on the primary via HS
> feedback.
> 2/ Slot sync worker is off with rare/missing/forgotten manual syncs:
> the synced slot's catalog_xmin is old and gets sent onto the physical
> slot on the primary via HS feedback.
Added case 2 as a TAP test in the attached 0003 patch.
On Tue, Aug 18, 2026 at 12:42 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Mon, Aug 17, 2026 at 10:46 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > > I believe this can happen in practice (as explained above). IMHO, XID
> > > age based slot invalidation must invalidate the synced slot on the
> > > standby (just like other invalidations except the idle-timeout based)
> > > if its catalog_xmin is aged and blocking vacuum on the primary.
> >
> > Fair enough, then let's invalidate synced slots as well on standby due
> > to xid_age
>
> Thanks. I will post the new patches soon.
Please find the attached v14 patches. 0003 now adds support for
invalidating XID-aged synced replication slots on standbys.
--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com