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