| From: | Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
| Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, masao(dot)fujii(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-07-28 09:43:13 |
| Message-ID: | 20260728184313.cd07b02accc7e37a4d83f624@sraoss.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, 26 Jun 2026 15:18:25 -0700
Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> Hi,
>
> On Fri, Jun 26, 2026 at 11:06 AM Nathan Bossart
> <nathandbossart(at)gmail(dot)com> wrote:
> >
> > On Fri, Jun 26, 2026 at 10:55:39AM +0900, Kyotaro Horiguchi wrote:
> > > 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.
> >
> > We already report the number of IDs remaining in the WARNING message. In
> > v19, I've added a DETAIL message that also reports the percentage
> > remaining, with the hope that it makes the urgency clearer.
>
> Yes. For example: WARNING: database "mydb" must be vacuumed within
> 99985967 transactions
>
> > >> + 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.
> >
> > I find both "percentage of IDs remaining" and "percentage of ID space
> > remaining" equally clear and have no strong opinion on the matter.
>
> My initial comment was that "IDs remaining" reads more naturally to me
> than "ID space remaining," but I'm happy to go with the majority here.
> IMHO, no need to spend more cycles on this.
I don't have a strong preference, but I slightly lean toward keeping "space".
The explicit denominator would make the percentage easier to interpret, and
"space" itself doesn't seem particularly confusing to me.
I have a comment of 0002 patch.
being able to advance the database's <structfield>datfrozenxid</structfield>.)
- If these warnings are ignored, the system will refuse to assign new XIDs once
+ If these warnings are ignored, the system will refuse to assign new transaction IDs once
there are fewer than three million transactions left until wraparound:
This also replaces "XIDs" with "transaction IDs" in the surrounding explanatory text.
I'm not sure this change is necessary, since that text is not part of the example output,
and "XID" is already used elsewhere in the same paragraph.
Regards,
Yugo Nagata
--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rafia Sabih | 2026-07-28 09:51:14 | Re: Bypassing cursors in postgres_fdw to enable parallel plans |
| Previous Message | solai v | 2026-07-28 09:35:09 | Re: Available disk space per tablespace |