Mark ItemPointer arguments as const in tuple/table lock functions
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2025-08-29T05:39:58Z
Releases:
19 (unreleased)
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%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/lmgr/lmgr.c | modified | +5 −5 |
| src/include/storage/lmgr.h | modified | +4 −4 |
Discussion
- Mark ItemPointer parameters as const in tuple/table lock functions 6 messages · 2025-08-27 → 2025-08-29