pgsql: Clarify comment on multixid offset wraparound check - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Clarify comment on multixid offset wraparound check
Date
Msg-id E1vV5Ht-000ssY-2s@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Clarify comment on multixid offset wraparound check

Coverity complained that offset cannot be 0 here because there's an
explicit check for "offset == 0" earlier in the function, but it
didn't see the possibility that offset could've wrapped around to 0.
The code is correct, but clarify the comment about it.

The same code exists in backbranches in the server
GetMultiXactIdMembers() function and in 'master' in the pg_upgrade
GetOldMultiXactIdSingleMember function. In backbranches Coverity
didn't complain about it because the check was merely an assertion,
but change the comment in all supported branches for consistency.

Per Tom Lane's suggestion.

Discussion: https://www.postgresql.org/message-id/1827755.1765752936@sss.pgh.pa.us

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/170361d7b869befdece6c4dfc5ad984d536d520f

Modified Files
--------------
src/backend/access/transam/multixact.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: David Rowley
Date:
Subject: pgsql: Fix typo in tablecmds.c
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Refactor static_assert() support.