Re: [HACKERS] A misconception about the meaning of 'volatile' in GetNewTransactionId? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] A misconception about the meaning of 'volatile' in GetNewTransactionId?
Date
Msg-id 32203.1493515149@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] A misconception about the meaning of 'volatile' in GetNewTransactionId?  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: [HACKERS] A misconception about the meaning of 'volatile' in GetNewTransactionId?  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> I was reading xact.c and noticed this block:
> ...
> Isn't this insufficient on non-TSO systems like POWER and Arm?

Yeah, I think you're right.  That code probably predates our support
for memory barriers, so "volatile" was the best we could do at the
time --- but as you say, it doesn't fix hardware-level rearrangements.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: [HACKERS] A misconception about the meaning of 'volatile' in GetNewTransactionId?
Next
From: Craig Ringer
Date:
Subject: Re: [HACKERS] CTE inlining