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

2017-04-29 Thread Tom Lane
Thomas Munro 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

[HACKERS] A misconception about the meaning of 'volatile' in GetNewTransactionId?

2017-04-29 Thread Thomas Munro
Hi hackers, I was reading xact.c and noticed this block: /* * Use volatile pointer to prevent code rearrangement; other backends * could be examining my subxids info concurrently, and we don't want * them to see an invalid