Re: Remove HeapTupleheaderSetXmin{Committed,Invalid} functions
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Andy Fan <zhihuifan1213@163.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-25T08:15:31Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove HeapTupleheaderSetXminCommitted/Invalid functions
- cbef472558ca 19 (unreleased) landed
-
Convert macros to static inline functions (htup_details.h, itup.h)
- 34694ec888d6 18.0 cited
-
Change the way we mark tuples as frozen.
- 37484ad2aace 9.4.0 cited
-
Code review for HeapTupleHeader changes. Add version number to page headers
- c7a165adc64e 7.3.1 cited
-
This patch wraps all accesses to t_xmin, t_cmin, t_xmax, and t_cmax in
- 3c35face4108 7.3.1 cited
On Wed, Jun 25, 2025 at 07:47:27AM +0000, Andy Fan wrote: > When I am reading the code, I first thought I can do something in > HeapTupleheaderSetXminCommitted, then I realized we have SetHintBits. > After some research, I find HeapTupleHeaderSetXminCommitted is never > used and it looks not safe to use after comparing with SetHintBits. So > to avoid future confusion or misuse, I'd suggest to remove it. I think > HeapTupleHeaderSetXminInvalid should be the same. So here is the patch. There is a cost in removing such code, even if not used in core: extension code outside of core may use it, and they would fail to compile. This can break code, and keeping them around has no maintenance cost. -- Michael