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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
Cc: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(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>, 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-17 05:59:24
Message-ID: CAA4eK1++Y7Tbupb3YUdadYjConUi-QtfM4p7k-mNHazxGSGwrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 14, 2025 at 5:30 PM Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> wrote:
>
> Here is a summary of changes in v78:
>

A few minor comments:
1.
Slots that appear idle due to a disrupted connection between
+ the publisher and subscriber are also excluded, as they are managed by
+ <link linkend="guc-wal-sender-timeout"><varname>wal_sender_timeout</varname></link>.
...

How do we exclude the above kind of slots? I think it is trying to
cover the case where walsender is not exited even after the connection
is broken between publisher and subscriber. The point is quite
confusing and adds much less value. So, we can remove it.

2.
- * Returns true when any slot have got invalidated.
+ * Returns true if there are any invalidated slots.
...

I find the existing comment more suitable for this function and easy to follow.

Apart from the above, I have changed a few other comments and minor
cosmetic cleanup.

--
With Regards,
Amit Kapila.

Attachment Content-Type Size
v78_amit.1.patch.txt text/plain 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2025-02-17 06:03:56 Re: Some read stream improvements
Previous Message Thomas Munro 2025-02-17 05:57:46 Re: Some read stream improvements