pgsql: Adjust weird usages of sentinel_ok()

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Adjust weird usages of sentinel_ok()
Date: 2026-10-16 08:07:30
Message-ID: E1xHcyQ-00000001qRA-1tUb@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Adjust weird usages of sentinel_ok()

All other callers of sentinel_ok() pass the palloc'd address to the
function and the requested size of the allocation as the 2nd parameter.
Here we adjust 3 locations that were passing the MemoryChunk and adding on
sizeof(MemoryChunk) onto the byte count. Effectively, it's the same byte,
but a strange way to calculate it.

Author: David Rowley <dgrowleyml(at)gmail(dot)com>
Reviewed-by: shihao zhong <zhong950419(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAApHDvq7HyLWX27XCSf5BmijeObV-QUF6CCbKAW00LxFPc71Ag@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/57926d757ab43852021d917b6221687a341c8385

Modified Files
--------------
src/backend/utils/mmgr/aset.c | 2 +-
src/backend/utils/mmgr/generation.c | 2 +-
src/backend/utils/mmgr/slab.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2026-10-16 13:39:39 pgsql: doc: Clarify where autovacuum_max_parallel_workers can be set
Previous Message Richard Guo 2026-10-16 07:49:04 pgsql: Fix bogus Assert in find_var_for_subquery_tle