There are a bunch of places where we do things like
PGPROC *proc = arrayP-procs[index];
/* Fetch xid just once - see GetNewTransactionId */
TransactionId pxid = proc-xid;
... use pxid several times ...
In the case where use
Tom Lane wrote:
Comments? Does anyone think the C standard forbids what I'm worried
about?
My understanding of the C spec is that it explicitly *allows* for
exactly what you're afraid of. It's even possible if the uses include
function calls, as the compiler might inline the function
Brian Hurt [EMAIL PROTECTED] writes:
Note that all sorts of weirdnesses are possible when you have shared
mutable state between multiple different threads.
Yeah. In the majority of places this isn't a big problem because
access to shared memory looks like
LWLockAcquire(some_lock);