Re: Avoid updating inactive_since for invalid replication slots

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Subject: Re: Avoid updating inactive_since for invalid replication slots
Date: 2025-02-05 03:29:26
Message-ID: CAA4eK1LP+T6FQkKtiv2WVk58W9DpNBvLAkqNxLowsorJEg6Tcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 5, 2025 at 5:53 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Some review comments for v2-0001.
>
> ======
> doc/src/sgml/system-views.sgml
>
> 1.
> The time when the slot became inactive. NULL if the slot is currently
> being streamed. If the slot becomes invalid, this value will never be
> updated. Note that for slots on the standby that are being synced from
> a primary server (whose synced field is true), the inactive_since
> indicates the time when slot synchronization (see Section 47.2.3) was
> most recently stopped. NULL if the slot has always been synchronized.
> On standby, this is useful for slots that are being synced from a
> primary server (whose synced field is true) so they know when the slot
> stopped being synchronized.
>
> ~
>
> (maybe not strictly related to this patch, but perhaps you can fix it
> in passing because it will help the readability of the newly added
> sentence also...)
>
> There are 2 different explanations for NULL:
> "NULL if the slot is currently being streamed."
> "NULL if the slot has always been synchronized."
>
> I'm assuming that 2nd description is only to be read in the scope of
> "Note that for slots on the standby that are being synced from a
> primary server...". IMO inserting a blank line before "Note that for
> slots on the standby..." will help separate these two quite different
> descriptions for the same field.
>

This is unrelated to this patch, but I don't mind you proposing a
separate patch if you feel it will make it clear. Did you see separate
paragraphs in other descriptions?

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2025-02-05 04:03:52 Re: [PATCH] Optionally record Plan IDs to track plan changes for a query
Previous Message Peter Smith 2025-02-05 03:13:34 Re: Introduce XID age and inactive timeout based replication slot invalidation