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

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description
Date: 2024-09-03 08:39:08
Message-ID: ZtbLLItQ5BTZNAyS@ip-10-97-1-34.eu-west-3.compute.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Sep 03, 2024 at 05:52:53PM +1000, Peter Smith wrote:
> On Tue, Sep 3, 2024 at 4:35 PM Bertrand Drouvot
> <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
> >
> > Hi,
> >
> > On Tue, Sep 03, 2024 at 10:43:14AM +0530, Amit Kapila wrote:
> > > On Mon, Sep 2, 2024 at 9:14 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> > > >
> > > > On Mon, Sep 2, 2024 at 5:47 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> > > > > ----
> > > > >
> > > > > To summarize, the current description wrongly describes the field as a
> > > > > time duration:
> > > > > "The time since the slot has become inactive."
> > > > >
> > > > > I suggest replacing it with:
> > > > > "The slot has been inactive since this time."
> > > > >
> > > >
> > > > +1 for the change. If I had read the document without knowing about
> > > > the patch, I too would have interpreted it as a duration.
> > > >
> > >
> > > The suggested change looks good to me as well. I'll wait for a day or
> > > two before pushing to see if anyone thinks otherwise.
> >
> > I'm not 100% convinced the current wording is confusing because:
> >
> > - the field type is described as a "timestamptz".
> > - there is no duration unit in the wording (if we were to describe a duration,
> > we would probably add an unit to it, like "The time (in s)...").
> >
>
> Hmm. I assure you it is confusing because in English "The time since"
> implies duration, and that makes the sentence contrary to the
> timestamptz field type.

Oh if that implies duration (I'm not a native English speaker and would have
assumed that it does not imply a duration 100% of the time) then yeah there is
some contradiction between the wording and the returned type.

> Indeed, I cited the Chat-GPT's interpretation
> above specifically so that people would not just take this as my
> opinion.

Right, I was just wondering what would Chat-GPT answer if you add "knowing
that the time is of timestamptz datatype" to the question?

> To avoid confusion we only need to say what we mean.

Sure, I was just saying that I did not see any confusion given the returned
datatype. Now that you say that "The time since" implies duration then yeah, in
that case, it's better to provide the right wording then.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2024-09-03 08:50:07 Re: Remove no-op PlaceHolderVars
Previous Message Michael Paquier 2024-09-03 07:59:18 Re: Partitioned tables and [un]loggedness