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 <[email protected]>
Reviewed-by: Bharath Rupireddy <[email protected]>
Reviewed-by: Kyotaro Horiguchi <[email protected]>
Reviewed-by: Nathan Bossart <[email protected]>
Reviewed-by: Yugo Nagata <[email protected]>
Discussion: 
https://postgr.es/m/cahgqgwhwztsr6bjdfpa+pokbpjoxxm2luj+5nh+cvdyqeas...@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dc6b6fe0a841f006db3f9a5752efbcb176f60e1c

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(-)

Reply via email to