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

Lines changed: 3 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy