| From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
|---|---|
| To: | masao(dot)fujii(at)gmail(dot)com |
| Cc: | bharath(dot)rupireddyforpostgres(at)gmail(dot)com, nathandbossart(at)gmail(dot)com, qiuwenhuifx(at)gmail(dot)com, shinya11(dot)kato(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: enhance wraparound warnings |
| Date: | 2026-06-26 01:55:39 |
| Message-ID: | 20260626.105539.2164712575561010742.horikyota.ntt@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello,
At Fri, 26 Jun 2026 09:51:16 +0900, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote in
> On Fri, Jun 26, 2026 at 2:19 AM Bharath Rupireddy
> <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> > The use there is referring to the whole set of transaction IDs and how
> > one can visualize the use of them - so "XID space" in that context
> > seems fine to me.
> >
> > But the wraparound warnings read better when they say how many more
> > transaction IDs are left:
> >
> > + errdetail("Approximately %.2f%% of MultiXactIds remain before wraparound.",
> > + errdetail("Approximately %.2f%% of transaction IDs remain before wraparound.",
>
> Okay, I've updated the patches as suggested. The updated patches are attached.
I'm not sure I'm following this correctly, but the explanation above
sounded to me as if the warning should report the number of IDs
remaining before wraparound, e.g. "Approximately N MultiXactIds remain
before wraparound", so I'm a bit confused by the proposed wording.
> + errdetail("Approximately %.2f%% of MultiXactIds remain before wraparound.",
The attached patch adopts that wording. However, I'm not sure how to
interpret it. The value is still expressed as a percentage, but it is
no longer clear what that percentage is relative to.
Whichever approach we choose, I think the wording should be explicit.
If the value is reported as a percentage, then something like "x.xx%
of MultiXactId space remains" seems clearer to me. If it is reported
as a count, then "N MultiXactIds remain" would make more sense.
Regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Samba Siva Reddy Chinta | 2026-06-26 01:46:54 | [PATCH] Add hook for plugins to acquire sample rows during ANALYZE |