Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Peter Smith <smithpb2250(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, shveta(dot)malik(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description
Date: 2024-11-15 09:31:41
Message-ID: CAA4eK1+R56E038z6rfP67011J1k1pAfQJ3_DAmQn3jKVc9qhKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 14, 2024 at 12:12 PM Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> wrote:
>
> On Thu, Oct 31, 2024 at 11:05 PM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >
> >
> > Yes, all good suggestions, updated patch attached.
> >
>
> Few comments for the changes under "inactive_since" description:
>
> + The time when slot synchronization (see <xref
> + linkend="logicaldecoding-replication-slots-synchronization"/>)
> + was most recently stopped. <literal>NULL</literal> if the slot
> + has always been synchronized. This is useful for slots on the
> + standby that are being synced from a primary server (whose
> + <structfield>synced</structfield> field is <literal>true</literal>)
> + so they know when the slot stopped being synchronized.
>
> 1)
> To me, the above lines give the impression that "inactive_since" is
> only meaningful for the logical slots which are being synchronized
> from primary to standby, which is not correct. On a primary node, this
> column gives the timestamp when any slot becomes inactive. By removing
> the line -
> - The time since the slot has become inactive.
> I feel we lost the description that explains this column’s purpose on
> primary nodes. I suggest explicitly clarifying the inactive_since
> column's meaning on primary nodes as well.
>

Good point. The same holds true for following change in the patch as well:
- /* The time since the slot has become inactive */
+ /* The time when slot synchronization was most recently stopped. */
TimestampTz inactive_since;

Do you have suggestions for improving the proposal?

> 2) Can we add more details to it for column's behavior on restarting
> a node, something like -
> "For the inactive slots, restarting a node resets the "inactive_since"
> time to the node's start time. "
>

I am not so sure about this. Adding too-long descriptions also
sometimes confuses users.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-11-15 09:38:08 Re: JIT: The nullness of casetest.value can be determined at the JIT compile time.
Previous Message Bertrand Drouvot 2024-11-15 09:18:50 Re: Potential ABI breakage in upcoming minor releases