Mark ItemPointer parameters as const in tuple/table lock functions
Chao Li <li.evan.chao@gmail.com>
From: Chao Li <li.evan.chao@gmail.com>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-27T08:57:31Z
Lists: pgsql-hackers
Attachments
- v1-0001-Mark-ItemPointer-parameters-as-const-in-tuple-tab.patch (application/octet-stream) patch v1-0001
Hi Hackers, This is a pure refactor patch. The functions LockTuple, ConditionalLockTuple, UnlockTuple, and XactLockTableWait take an ItemPointer parameter named 'tid'. Since these functions do not modify the tuple identifier, the parameter should be declared as const to better convey intent and allow the compiler to enforce immutability. With this patch, build still passes, and "make check" also passes. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/
Commits
-
Mark ItemPointer arguments as const in tuple/table lock functions
- 991295f387a6 19 (unreleased) landed