Remove HeapTupleheaderSetXmin{Committed,Invalid} functions

From: Andy Fan <zhihuifan1213(at)163(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Remove HeapTupleheaderSetXmin{Committed,Invalid} functions
Date: 2025-06-25 07:47:27
Message-ID: 87sejogt4g.fsf@163.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi,

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.

commit ed905d64c6b81a78627f895918d4ac723d46865c (HEAD -> heap_set_bits)
Author: Andy Fan <zhihuifan1213(at)163(dot)com>
Date: Wed Jun 25 07:35:32 2025 +0000

Remove HeapTupleheaderSetXminCommitted/Invalid functions

They are neither be used nor be safe to be used, User should use
SetHintBits instead.

What do you think?

--
Best Regards
Andy Fan

Attachment Content-Type Size
v1-0001-Remove-HeapTupleheaderSetXminCommitted-Invalid-fu.patch text/x-diff 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2025-06-25 07:48:43 RE: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly
Previous Message jian he 2025-06-25 07:40:50 Re: SQL:2023 JSON simplified accessor support