Re: Introduce XID age based replication slot invalidation

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: surya poondla <suryapoondla4(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "sawada(dot)mshk(at)gmail(dot)com" <sawada(dot)mshk(at)gmail(dot)com>, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "johnhyvr(at)gmail(dot)com" <johnhyvr(at)gmail(dot)com>
Subject: Re: Introduce XID age based replication slot invalidation
Date: 2026-09-16 04:48:51
Message-ID: CABdArM5zjth_zzD_bYnZbMwm3svCndZu8hB8+pd5O=s-PRVN0g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 16, 2026 at 4:04 AM surya poondla <suryapoondla4(at)gmail(dot)com> wrote:
>
>>
>> The comments above drop_local_obsolete_slots() already
>> anticipate standby-side invalidation from max_slot_wal_keep_size, but
>> assume the slot gets recreated successfully in the next cycle, which
>> doesn't hold when the remote isn't advancing.
>
>
> If the two are equivalent, then that comment looks like the concrete thing worth fixing, since it's the assumption that misleads. A note in the docs that a synced slot can be invalidated on the standby, and that recovering it needs action on the primary, might help too, given users can't drop it themselves.
>

+1. It would be good to update the comments above
drop_local_obsolete_slots() to cover the new GUC as well.

We already have guidance in the docs for such failure scenarios at
[1]. I think it broadly covers this GUC case too, but it can be
reviewed for completeness.

[1] https://www.postgresql.org/docs/current/logicaldecoding-explanation.html#LOGICALDECODING-REPLICATION-SLOTS-SYNCHRONIZATION

--
Thanks,
Nisha

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-09-16 04:50:32 Re: Distinguish publication exclusions in object addresses
Previous Message Amit Kapila 2026-09-16 04:34:57 Re: Distinguish publication exclusions in object addresses