pgsql: Restore sane locking behavior during parallel query.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Restore sane locking behavior during parallel query.
Date: 2018-10-06 19:49:43
Message-ID: E1g8sa7-000268-Uj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/29ef2b310da9892fda075ff9ee12da7f92d5da6e

Modified Files
--------------
src/backend/access/heap/heapam.c | 4 ----
src/backend/executor/execMain.c | 4 ++--
src/backend/executor/execUtils.c | 32 ++++++++++++++++++++++---------
src/backend/executor/nodeBitmapHeapscan.c | 6 +-----
src/backend/executor/nodeCustom.c | 2 +-
src/backend/executor/nodeForeignscan.c | 4 ++--
src/backend/executor/nodeIndexonlyscan.c | 2 +-
src/backend/executor/nodeIndexscan.c | 2 +-
src/backend/executor/nodeSamplescan.c | 5 +----
src/backend/executor/nodeSeqscan.c | 5 +----
src/backend/executor/nodeTidscan.c | 2 +-
11 files changed, 34 insertions(+), 34 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2018-10-06 22:18:46 pgsql: Fix event triggers for partitioned tables
Previous Message Tom Lane 2018-10-06 19:13:02 pgsql: Remove more redundant relation locking during executor startup.