Re: Introduce XID age and inactive timeout based replication slot invalidation - Mailing list pgsql-hackers

From Nisha Moond
Subject Re: Introduce XID age and inactive timeout based replication slot invalidation
Date
Msg-id CABdArM5vmGTJ1fmDEG75DMU2K+_N+A72UQ2kiVkxCCCwW-b_og@mail.gmail.com
Whole thread Raw
In response to Re: Introduce XID age and inactive timeout based replication slot invalidation  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
On Wed, Feb 5, 2025 at 10:30 AM vignesh C <vignesh21@gmail.com> wrote:
>
> On Tue, 4 Feb 2025 at 19:56, Nisha Moond <nisha.moond412@gmail.com> wrote:
> >
> > Here is v69 patch set addressing above and Kuroda-san's comments in [1].
>
> 2) Here we have mentioned about invalidation happens only for a)
> released slots b) inactive slots replication slots c) slot where
> communication between pub and sub is down
> +                * XXX: Slot invalidation due to 'idle_timeout' applies only to
> +                * released slots, and is based on the
> 'idle_replication_slot_timeout'
> +                * GUC. Active slots currently in use for replication
> are excluded to
> +                * prevent accidental invalidation. Slots where
> communication between
> +                * the publisher and subscriber is down are also
> excluded, as they are
> +                * managed by the 'wal_sender_timeout'.
> +                */
> +               InvalidateObsoleteReplicationSlots(RS_INVAL_IDLE_TIMEOUT,
> +
>             0,
> +
>             InvalidOid,
> +
>             InvalidTransactionId);
> a) Can we include about slots which does not reserve WAL are also not
> considered.

We have included all the info regarding which slots are excluded in
the documents, so I feel we can remove the XXX: comment from here.
(done in v70).

> c) While I was initially reviewing the patch I also had the similar
> thoughts on my mind, if we could mention the one like "Slots where
> communication between the publisher and subscriber is down are also
> excluded, as they are managed by the 'wal_sender_timeout'" in the
> documentation it might be good.
>

v70 adds the suggested info in the docs.

--
Thanks,
Nisha



pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.
Next
From: Nisha Moond
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation