Re: Reword messages using "as" instead of "because"

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Reword messages using "as" instead of "because"
Date: 2025-09-18 05:29:14
Message-ID: CAA4eK1+tUbxMC3zpaC0TZkU24ym=LOdMTxN6wczeB=ngoc-0+w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 18, 2025 at 10:22 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
> > On Thu, Sep 18, 2025 at 8:56 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> +1 for the first change, but for this:
> >>
> >> - ? errdetail("Retention is re-enabled as the apply process is advancing its xmin within the configured max_retention_duration of %u ms.",
> >> + ? errdetail("Retention is re-enabled because the apply process can advance its xmin within the configured max_retention_duration of %u ms.",
> >>
> >> would it be better to say
> >>
> >> "Retention is re-enabled because the apply process was able to advance its xmin within the configured max_retention_duration of %u ms."
>
> > xmin is not yet advanced. In this state, we ensured that the
> > subscriber has caught up with the publisher and now the apply worker
> > can start maintaining/advancing its xmin.
>
> Hm, so what has max_retention_duration got to do with it?
>

It is the duration used to avoid subscriber being too much behind
publisher (and hence leading to retaining dead tuples for conflict
detection for a very long time). If the apply worker on the subscriber
is not caught up for this (max_retention_duration) duration then we
stop retaining dead tuples. Similarly, when the apply worker is able
to catch up before max_retention_duration is elapsed, we will resume
retention.

>
That
> is, should the message just read
>
> "Retention is re-enabled because the apply process can advance its xmin."
> or better
> "Retention is re-enabled because the apply process has caught up with the publisher."
>
> This now reminds me of a point that I meant to make in my previous
> reply and forgot: this whole business of "advancing xmin" is
> implementation jargon.
>

Yeah, this sounds clear but shall we consider using
max_retention_duration like: "Retention is re-enabled because the
apply process has caught up with the publisher within the configured
max_retention_duration.". We can have a single message if we don't
want to specify the value of max_retention_duration or simply skip
adding max_retention_duration.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-09-18 05:37:29 Re: Suggestion to add --continue-client-on-abort option to pgbench
Previous Message shveta malik 2025-09-18 05:21:50 Re: Report bytes and transactions actually sent downtream