Re: Allow tuple visibility checks without hint-bit, maintenance

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Allow tuple visibility checks without hint-bit, maintenance
Date: 2026-08-30 21:24:52
Message-ID: d8fbe279-08ef-4869-88a2-8684c57d4867@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-08-29 Sa 9:18 AM, Andres Freund wrote:
> Hi,
>
> On 2026-08-28 16:06:46 -0400, Andrew Dunstan wrote:
>> Table AMs that store heap-format tuples on pages managed by another WAL
>> scheme (generic WAL, for example) can't tolerate
>> HeapTupleSatisfiesVisibility() and friends opportunistically writing
>> hint bits to the buffer: an unlogged write between two WAL operations
>> invalidates the before-image a later generic-WAL delta is computed
>> against, and standby replay ends up with a corrupt page.
> Why do we care about such an AM? What's the point of all of this?

Well I had such an AM. However, your comments have prompted me to
revisit some of the design.

>
> Increasing the code size of performance critical code can decrease performance
> - in almost all the cases the new branches won't be able to be optimized out,
> because the buffer value is not known at compile time that the values.
>
>

FWIW, I did some performance checks and did not find a measurable
performance difference, at least on my laptop.

At any rate, thanks for looking. I will withdraw the CF item.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message sirisha chamarthi 2026-08-30 21:34:14 Re: WAIT FOR command should do some query jumbling
Previous Message shihao zhong 2026-08-30 20:45:50 Re: Commitfest manager for September 2026