pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Mark ItemPointer arguments as const in tuple/table lock function
Date: Fri, 29 Aug 2025 05:41:29 +0000
Message-ID: <E1urrrd-002BUk-0m@gemulon.postgresql.org> (raw)

Mark ItemPointer arguments as const in tuple/table lock functions

The functions LockTuple, ConditionalLockTuple, UnlockTuple, and
XactLockTableWait take an ItemPointer argument that they do not
modify, so the argument can be const-qualified to better convey intent
and allow the compiler to enforce immutability.

Author: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAEoWx2m9e4rECHBwpRE4%2BGCH%2BpbYZXLh2f4rB1Du5hDfKug%2BOg...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/991295f387a6a453fe061831bcc36294989fe77b

Modified Files
--------------
src/backend/storage/lmgr/lmgr.c | 10 +++++-----
src/include/storage/lmgr.h      |  8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1urrrd-002BUk-0m@gemulon.postgresql.org>
Permalink:  ../E1urrrd-002BUk-0m@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1urrrd-002BUk-0m@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Mark ItemPointer arguments as const in tuple/table lock function
  In-Reply-To: <E1urrrd-002BUk-0m@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