pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Clarify comment on multixid offset wraparound check
6+ messages / 1 participants
[nested] [flat]

* pgsql: Clarify comment on multixid offset wraparound check
@ 2025-12-15 09:54  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-12-15 09:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_17_STABLE

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

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Clarify comment on multixid offset wraparound check
@ 2025-12-15 09:54  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-12-15 09:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/366dcdaf5779792f522d1d18a8e558244850afdf

Modified Files
--------------
src/bin/pg_upgrade/multixact_read_v18.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Clarify comment on multixid offset wraparound check
@ 2025-12-15 09:54  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-12-15 09:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_18_STABLE

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

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Clarify comment on multixid offset wraparound check
@ 2025-12-15 09:54  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-12-15 09:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7d42e2367c6bdd5538fc914cd6858133bfb63f79

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Clarify comment on multixid offset wraparound check
@ 2025-12-15 09:54  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-12-15 09:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Clarify comment on multixid offset wraparound check
@ 2025-12-15 09:54  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-12-15 09:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_15_STABLE

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

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2025-12-15 09:54 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-12-15 09:54 pgsql: Clarify comment on multixid offset wraparound check Heikki Linnakangas <heikki.linnakangas@iki.fi>
2025-12-15 09:54 pgsql: Clarify comment on multixid offset wraparound check Heikki Linnakangas <heikki.linnakangas@iki.fi>
2025-12-15 09:54 pgsql: Clarify comment on multixid offset wraparound check Heikki Linnakangas <heikki.linnakangas@iki.fi>
2025-12-15 09:54 pgsql: Clarify comment on multixid offset wraparound check Heikki Linnakangas <heikki.linnakangas@iki.fi>
2025-12-15 09:54 pgsql: Clarify comment on multixid offset wraparound check Heikki Linnakangas <heikki.linnakangas@iki.fi>
2025-12-15 09:54 pgsql: Clarify comment on multixid offset wraparound check Heikki Linnakangas <heikki.linnakangas@iki.fi>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox