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

From Andreas Karlsson
Subject Re: Remove header lock BufferGetLSNAtomic() on architectures with 64 bit atomic operations
Date
Msg-id 375e47d7-0423-4537-b5d5-72ecc0549535@proxel.se
Whole thread Raw
In response to Re: Remove header lock BufferGetLSNAtomic() on architectures with 64 bit atomic operations  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 1/2/26 4:27 PM, Andres Freund wrote:
> A volatile on a non-pointer won't do you much good, I'm afraid. You need to
> make sure that the underlying value is read as a single 8 byte read, I don't
> see how this guarantees that, unfortunately.

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.

Andreas

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL
Next
From: jian he
Date:
Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions