diff options
Diffstat (limited to 'src/backend/executor/nodeSeqscan.c')
-rw-r--r-- | src/backend/executor/nodeSeqscan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/executor/nodeSeqscan.c b/src/backend/executor/nodeSeqscan.c index 0f3438d0639..1e566b2d505 100644 --- a/src/backend/executor/nodeSeqscan.c +++ b/src/backend/executor/nodeSeqscan.c @@ -28,6 +28,7 @@ #include "access/relscan.h" #include "executor/execdebug.h" #include "executor/nodeSeqscan.h" +#include "storage/predicate.h" static void InitScanRelation(SeqScanState *node, EState *estate); static TupleTableSlot *SeqNext(SeqScanState *node); @@ -105,11 +106,15 @@ SeqRecheck(SeqScanState *node, TupleTableSlot *slot) * tuple. * We call the ExecScan() routine and pass it the appropriate * access method functions. + * For serializable transactions, we first acquire a predicate + * lock on the entire relation. * ---------------------------------------------------------------- */ TupleTableSlot * ExecSeqScan(SeqScanState *node) { + PredicateLockRelation(node->ss_currentRelation); + node->ss_currentScanDesc->rs_relpredicatelocked = true; return ExecScan((ScanState *) node, (ExecScanAccessMtd) SeqNext, (ExecScanRecheckMtd) SeqRecheck); |