I noticed that a couple of the functions added by commit 34694ec use
"int16" instead of "uint16" for the infomask parameter.  I don't think
there are any live bugs here, but IMHO we should at least fix this for v19
to help prevent future problems.

Assuming there is agreement on this change, any thoughts on back-patching?

-- 
nathan
>From 22443d34f88ba47bc27ce51dd9b74839362776fe Mon Sep 17 00:00:00 2001
From: Nathan Bossart <[email protected]>
Date: Wed, 22 Oct 2025 14:58:14 -0500
Subject: [PATCH v1 1/1] fix type of infomask parameter in static inline
 functions

---
 src/include/access/htup_details.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/include/access/htup_details.h 
b/src/include/access/htup_details.h
index fa4525e3f58..f3593acc8c2 100644
--- a/src/include/access/htup_details.h
+++ b/src/include/access/htup_details.h
@@ -264,19 +264,19 @@ HEAP_LOCKED_UPGRADED(uint16 infomask)
  * Use these to test whether a particular lock is applied to a tuple
  */
 static inline bool
-HEAP_XMAX_IS_SHR_LOCKED(int16 infomask)
+HEAP_XMAX_IS_SHR_LOCKED(uint16 infomask)
 {
        return (infomask & HEAP_LOCK_MASK) == HEAP_XMAX_SHR_LOCK;
 }
 
 static inline bool
-HEAP_XMAX_IS_EXCL_LOCKED(int16 infomask)
+HEAP_XMAX_IS_EXCL_LOCKED(uint16 infomask)
 {
        return (infomask & HEAP_LOCK_MASK) == HEAP_XMAX_EXCL_LOCK;
 }
 
 static inline bool
-HEAP_XMAX_IS_KEYSHR_LOCKED(int16 infomask)
+HEAP_XMAX_IS_KEYSHR_LOCKED(uint16 infomask)
 {
        return (infomask & HEAP_LOCK_MASK) == HEAP_XMAX_KEYSHR_LOCK;
 }
-- 
2.39.5 (Apple Git-154)

Reply via email to