Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 71932ec

Browse files
committed
Add comment about memory reordering to PredicateLockTupleRowVersionLink.
Dan Ports, per head-scratching from Simon Riggs and myself.
1 parent 5c5f835 commit 71932ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/storage/lmgr/predicate.c

+3
Original file line numberDiff line numberDiff line change
@@ -2283,6 +2283,9 @@ PredicateLockTupleRowVersionLink(const Relation relation,
22832283
* locks. Even if a serializable transaction starts concurrently,
22842284
* we know it can't take any SIREAD locks on the modified tuple
22852285
* because the caller is holding the associated buffer page lock.
2286+
* Memory reordering isn't an issue; the memory barrier in the
2287+
* LWLock acquisition guarantees that this read occurs while the
2288+
* buffer page lock is held.
22862289
*/
22872290
if (!TransactionIdIsValid(PredXact->SxactGlobalXmin))
22882291
return;

0 commit comments

Comments
 (0)