aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-06-15 11:43:05 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-06-15 12:12:56 +0300
commitff4e078773b48260a36587b54537ca54d929898f (patch)
tree925c8a9aa597788f841cfd7268b6b59a39ad868a /src/backend/executor
parent80721b518292501058bb57a05fb6e2131997d0ec (diff)
downloadpostgresql-ff4e078773b48260a36587b54537ca54d929898f.tar.gz
postgresql-ff4e078773b48260a36587b54537ca54d929898f.zip
Make non-MVCC snapshots exempt from predicate locking. Scans with non-MVCC
snapshots, like in REINDEX, are basically non-transactional operations. The DDL operation itself might participate in SSI, but there's separate functions for that. Kevin Grittner and Dan Ports, with some changes by me.
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/nodeSeqscan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/executor/nodeSeqscan.c b/src/backend/executor/nodeSeqscan.c
index 1e566b2d505..f356874b441 100644
--- a/src/backend/executor/nodeSeqscan.c
+++ b/src/backend/executor/nodeSeqscan.c
@@ -113,7 +113,8 @@ SeqRecheck(SeqScanState *node, TupleTableSlot *slot)
TupleTableSlot *
ExecSeqScan(SeqScanState *node)
{
- PredicateLockRelation(node->ss_currentRelation);
+ PredicateLockRelation(node->ss_currentRelation,
+ node->ss_currentScanDesc->rs_snapshot);
node->ss_currentScanDesc->rs_relpredicatelocked = true;
return ExecScan((ScanState *) node,
(ExecScanAccessMtd) SeqNext,