pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Adjust weird usages of sentinel_ok()
Date: Fri, 16 Oct 2026 08:07:30 +0000
Message-ID: <E1xHcyQ-00000001qRA-1tUb@gemulon.postgresql.org> (raw)

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@gmail.com>
Reviewed-by: shihao zhong <zhong950419@gmail.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(-)



Message-ID: <E1xHcyQ-00000001qRA-1tUb@gemulon.postgresql.org>
Permalink:  ../E1xHcyQ-00000001qRA-1tUb@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xHcyQ-00000001qRA-1tUb@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org
  Subject: Re: pgsql: Adjust weird usages of sentinel_ok()
  In-Reply-To: <E1xHcyQ-00000001qRA-1tUb@gemulon.postgresql.org>
  References: <E1xHcyQ-00000001qRA-1tUb@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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