pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Restore sane locking behavior during parallel query.
Date: Sat, 06 Oct 2018 19:49:43 +0000
Message-ID: <E1g8sa7-000268-Uj@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1g8sa7-000268-Uj@gemulon.postgresql.org>
Permalink:  ../E1g8sa7-000268-Uj@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1g8sa7-000268-Uj@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Restore sane locking behavior during parallel query.
  In-Reply-To: <E1g8sa7-000268-Uj@gemulon.postgresql.org>
  References: <E1g8sa7-000268-Uj@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox