Commit 71932ecc authored by Robert Haas's avatar Robert Haas

Add comment about memory reordering to PredicateLockTupleRowVersionLink.

Dan Ports, per head-scratching from Simon Riggs and myself.
parent 5c5f8350
...@@ -2283,6 +2283,9 @@ PredicateLockTupleRowVersionLink(const Relation relation, ...@@ -2283,6 +2283,9 @@ PredicateLockTupleRowVersionLink(const Relation relation,
* locks. Even if a serializable transaction starts concurrently, * locks. Even if a serializable transaction starts concurrently,
* we know it can't take any SIREAD locks on the modified tuple * we know it can't take any SIREAD locks on the modified tuple
* because the caller is holding the associated buffer page lock. * because the caller is holding the associated buffer page lock.
* Memory reordering isn't an issue; the memory barrier in the
* LWLock acquisition guarantees that this read occurs while the
* buffer page lock is held.
*/ */
if (!TransactionIdIsValid(PredXact->SxactGlobalXmin)) if (!TransactionIdIsValid(PredXact->SxactGlobalXmin))
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment