]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Clarify comment on multixid offset wraparound check
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 15 Dec 2025 09:47:04 +0000 (11:47 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 15 Dec 2025 09:48:10 +0000 (11:48 +0200)
commitb0b52b7123ae6f26775d35c868f14a5dca7884d0
tree64ac967cde4f366678f232ef0c4ad1dd378c53b7
parentaa2ec0403d0af0082a8f8a68a5a231c4e62a9c3a
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
src/backend/access/transam/multixact.c