From ff4e078773b48260a36587b54537ca54d929898f Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 15 Jun 2011 11:43:05 +0300 Subject: 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. --- src/backend/executor/nodeSeqscan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/backend/executor/nodeSeqscan.c') 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, -- cgit v1.2.3