Re: Introduce XID age based replication slot invalidation

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Masahiko Sawada <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>, John H <johnhyvr(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Introduce XID age based replication slot invalidation
Date: 2026-08-20 01:05:00
Message-ID: CALj2ACW85VTbSOyENMfAvT110x18V=HT4FOPwS9qYSXwy=2izg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Aug 19, 2026 at 4:09 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> > > Additionally, for synced slots, we could add a LOG/WARNING when they
> > > are nearing invalidation as there are no direct consumers for the
> > > same.
> >
> > That's an interesting idea. I see this as useful not just for XID-age
> > based invalidation but for slot invalidation in general. Having some
> > warning before a slot gets invalidated, something like when the
> > database approaches XID wraparound limits, whether built into core or
> > via a documented SQL query, would be nice to have. It's worth
> > discussing separately.
> >
> I thought for synced slots, it is important as there is no active
> consumer for them.

Understood. Even though synced slots show up in pg_replication_slots
on the standby, I agree it's worth adding early warnings before they
get invalidated. I will try to discuss this separately since the idea
applies to synced slot invalidation in general, not just the XID-age
based one.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2026-08-20 01:07:01 Re: Test tidscan,sql is not immune to autovacuum in v14
Previous Message David Rowley 2026-08-20 00:32:27 Re: Test tidscan,sql is not immune to autovacuum in v14