Thread
-
[PATCH v2 1/1] Remove HeapTupleheaderSetXminCommitted/Invalid functions
Andy Fan <zhihuifan1213@163.com> — 2025-06-25T07:35:32Z
Reasons include: (1). They are not used in core or any known third-party extension in codesearch.debian.net. (2). They are not safe to use when comparing with HeapTupleSetHintBits which is a public API as well for third party. (3). These functions do has some maintenance cost when people try to understanding them, including identifying they are not used at all and the right one is SetHintBits. Discussion: https://www.postgresql.org/message-id/87frfmgigm.fsf%40163.com --- src/include/access/htup_details.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h index aa957cf3b01..bc6094b001f 100644 --- a/src/include/access/htup_details.h +++ b/src/include/access/htup_details.h @@ -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) { -- 2.45.1 --=-=-=--