Re: Remove header lock BufferGetLSNAtomic() on architectures with 64 bit atomic operations - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Remove header lock BufferGetLSNAtomic() on architectures with 64 bit atomic operations
Date
Msg-id CAH2-Wzk7Kdk5Mz696J9p-JwX61tb2vyAjdAeagXLmXxUp1ADCw@mail.gmail.com
Whole thread Raw
In response to Re: Remove header lock BufferGetLSNAtomic() on architectures with 64 bit atomic operations  (Andreas Karlsson <andreas@proxel.se>)
List pgsql-hackers
On Wed, Jan 14, 2026 at 1:31 AM Andreas Karlsson <andreas@proxel.se> wrote:
> Yeah, that was a quite big thinko. I have a attached a patch with the
> thinko fixed but I am still not happy with it. I think I will try to use
> atomics.h and see if that makes the code nicer to read.
>
> Also will after that see what I can do about pageinspect.

I believe that pageinspect's heap_page_items function needs to use
get_page_from_raw -- see commit 14e9b18fed.

Attached patch 0002-* shows what's required. I'm including your
original 0001-* patch from your v2 here, to keep CFTester happy.

We (Tomas Vondra and I) are treating this as a dependency for our
index prefetching patch. It'd be good to get this done soon.
--
Peter Geoghegan

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Non-deterministic buffer counts reported in execution with EXPLAIN ANALYZE BUFFERS
Next
From: Nathan Bossart
Date:
Subject: Re: [PATCH] Support reading large objects with pg_read_all_data