diff options
author | Tom Lane | 2018-10-06 19:49:37 +0000 |
---|---|---|
committer | Tom Lane | 2018-10-06 19:49:37 +0000 |
commit | 29ef2b310da9892fda075ff9ee12da7f92d5da6e (patch) | |
tree | 9505320f23af01455ff4cde46bd33702b3ddf635 /src/backend/executor/nodeCustom.c | |
parent | f2343653f5b2aecfc759f36dbb3fd2a61f36853e (diff) |
Restore sane locking behavior during parallel query.
Commit 9a3cebeaa changed things so that parallel workers didn't obtain
any lock of their own on tables they access. That was clearly a bad
idea, but I'd mistakenly supposed that it was the intended end result
of the series of patches for simplifying the executor's lock management.
Undo that change in relation_open(), and adjust ExecOpenScanRelation()
so that it gets the correct lock if inside a parallel worker.
In passing, clean up some more obsolete comments about when locks
are acquired.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/executor/nodeCustom.c')
-rw-r--r-- | src/backend/executor/nodeCustom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/nodeCustom.c b/src/backend/executor/nodeCustom.c index 9a33eda6887..7972d5a952a 100644 --- a/src/backend/executor/nodeCustom.c +++ b/src/backend/executor/nodeCustom.c @@ -55,7 +55,7 @@ ExecInitCustomScan(CustomScan *cscan, EState *estate, int eflags) ExecAssignExprContext(estate, &css->ss.ps); /* - * open the base relation, if any, and acquire an appropriate lock on it + * open the scan relation, if any */ if (scanrelid > 0) { |