Re: Introduce XID age and inactive timeout based replication slot invalidation

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
Date: 2025-02-06 02:32:07
Message-ID: CABdArM5vmGTJ1fmDEG75DMU2K+_N+A72UQ2kiVkxCCCwW-b_og@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 5, 2025 at 10:30 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Tue, 4 Feb 2025 at 19:56, Nisha Moond <nisha(dot)moond412(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2025-02-06 02:32:13 Re: Introduce XID age and inactive timeout based replication slot invalidation
Previous Message Michael Paquier 2025-02-06 02:28:52 Re: Show WAL write and fsync stats in pg_stat_io