]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Remove HeapTupleheaderSetXminCommitted/Invalid functions
authorÁlvaro Herrera <alvherre@kurilemu.de>
Mon, 9 Feb 2026 18:15:20 +0000 (19:15 +0100)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Mon, 9 Feb 2026 18:15:20 +0000 (19:15 +0100)
They are not and never have been used by any known code -- apparently we
just cargo-culted them in commit 37484ad2aace (or their ancestor macros
anyway, which begat these functions in commit 34694ec888d6).  Allegedly
they're also potentially dangerous; users are better off going through
HeapTupleSetHintBits instead.

Author: Andy Fan <zhihuifan1213@163.com>
Discussion: https://postgr.es/m/87sejogt4g.fsf@163.com

src/include/access/htup_details.h

index d406825ff22061fcde0bcd48db7df446bbeae40e..75f8b159b8aefb6db01a2a3ed48c945af6d6d0f9 100644 (file)
@@ -357,20 +357,6 @@ HeapTupleHeaderXminFrozen(const HeapTupleHeaderData *tup)
        return (tup->t_infomask & HEAP_XMIN_FROZEN) == HEAP_XMIN_FROZEN;
 }
 
-static inline void
-HeapTupleHeaderSetXminCommitted(HeapTupleHeaderData *tup)
-{
-       Assert(!HeapTupleHeaderXminInvalid(tup));
-       tup->t_infomask |= HEAP_XMIN_COMMITTED;
-}
-
-static inline void
-HeapTupleHeaderSetXminInvalid(HeapTupleHeaderData *tup)
-{
-       Assert(!HeapTupleHeaderXminCommitted(tup));
-       tup->t_infomask |= HEAP_XMIN_INVALID;
-}
-
 static inline void
 HeapTupleHeaderSetXminFrozen(HeapTupleHeaderData *tup)
 {