diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-05-06 21:53:55 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-05-06 21:55:10 -0400 |
commit | 71932ecc2b6ca0d748176a7e8b11d3575bf4caf3 (patch) | |
tree | b983067d5cc555e9a40ae31f0a071e522346ac3c /src/backend/storage | |
parent | 5c5f83507cb697e436f8f9d20d62787c1a66d19c (diff) | |
download | postgresql-71932ecc2b6ca0d748176a7e8b11d3575bf4caf3.tar.gz |
Add comment about memory reordering to PredicateLockTupleRowVersionLink.
Dan Ports, per head-scratching from Simon Riggs and myself.
Diffstat (limited to 'src/backend/storage')
-rw-r--r-- | src/backend/storage/lmgr/predicate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c index 48ff9cc151..3b3158efe5 100644 --- a/src/backend/storage/lmgr/predicate.c +++ b/src/backend/storage/lmgr/predicate.c @@ -2283,6 +2283,9 @@ PredicateLockTupleRowVersionLink(const Relation relation, * locks. Even if a serializable transaction starts concurrently, * we know it can't take any SIREAD locks on the modified tuple * 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)) return; |