pgsql: Clarify wraparound warning percentage messages

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Clarify wraparound warning percentage messages
Date: 2026-08-05 02:39:13
Message-ID: E1wrRXF-00000000F5b-2VTn@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Clarify wraparound warning percentage messages

Commit e646450e609 added DETAIL messages for XID and MultiXactId
wraparound warnings that described the reported percentage as the
percentage of IDs available for use. However, the percentage is actually
calculated from the remaining distance to the wraparound limit, not the
stop limit where new IDs are refused. As a result, the wording could be
misinterpreted as meaning that the reported percentage of IDs can still
be allocated.

Update the wording to clarify that the reported percentage represents the
remaining transaction ID space or MultiXactId space before wraparound.

Also update the related XID warning hints to use "transaction ID"
terminology consistently.

Backpatch to v19, where the DETAIL messages were added.

Author: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Reviewed-by: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Reviewed-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Discussion: https://postgr.es/m/CAHGQGwHWZTsR6bjdfpa+pOkBPjoXXm2LuJ+5nh+CvdyqEASHcQ@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3d4216d85f42d9f011001367d5f962ca8d1d72e2

Modified Files
--------------
doc/src/sgml/maintenance.sgml | 4 ++--
src/backend/access/transam/multixact.c | 8 ++++----
src/backend/access/transam/varsup.c | 14 +++++++-------
src/test/modules/xid_wraparound/t/002_limits.pl | 3 ++-
4 files changed, 15 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2026-08-05 02:39:23 pgsql: doc: Update XID wraparound error example
Previous Message Fujii Masao 2026-08-05 02:38:49 pgsql: Clarify wraparound warning percentage messages