Re: A misconception about the meaning of 'volatile' in GetNewTransactionId?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A misconception about the meaning of 'volatile' in GetNewTransactionId?
Date: 2017-04-30 01:19:09
Message-ID: 32203.1493515149@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-04-30 03:51:18 Re: CTE inlining
Previous Message Thomas Munro 2017-04-30 01:05:03 A misconception about the meaning of 'volatile' in GetNewTransactionId?