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: Remove more redundant relation locking during executor startup.
Date: Sat, 06 Oct 2018 19:13:02 +0000
Message-ID: <E1g8s0c-0001PI-Go@gemulon.postgresql.org> (raw)

Remove more redundant relation locking during executor startup.

We already have appropriate locks on every relation listed in the
query's rangetable before we reach the executor.  Take the next step
in exploiting that knowledge by removing code that worries about
taking locks on non-leaf result relations in a partitioned table.

In particular, get rid of ExecLockNonLeafAppendTables and a stanza in
InitPlan that asserts we already have locks on certain such tables.

In passing, clean up some now-obsolete comments in InitPlan.

Amit Langote, reviewed by David Rowley and Jesper Pedersen,
and whacked around a bit more by me

Discussion: https://postgr.es/m/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f2343653f5b2aecfc759f36dbb3fd2a61f36853e

Modified Files
--------------
src/backend/executor/execMain.c        | 56 ++++++++-----------------------
src/backend/executor/execUtils.c       | 60 ----------------------------------
src/backend/executor/nodeAppend.c      |  6 ----
src/backend/executor/nodeMergeAppend.c |  6 ----
src/include/executor/executor.h        |  2 --
5 files changed, 14 insertions(+), 116 deletions(-)



Message-ID: <E1g8s0c-0001PI-Go@gemulon.postgresql.org>
Permalink:  ../E1g8s0c-0001PI-Go@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1g8s0c-0001PI-Go@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: Remove more redundant relation locking during executor startup.
  In-Reply-To: <E1g8s0c-0001PI-Go@gemulon.postgresql.org>
  References: <E1g8s0c-0001PI-Go@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