pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Rewrite interaction of parallel mode with parallel executor supp
Date: Fri, 16 Oct 2015 15:56:41 +0000
Message-ID: <E1Zn7N3-0001pS-28@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Rewrite interaction of parallel mode with parallel executor support.

In the previous coding, before returning from ExecutorRun, we'd shut
down all parallel workers.  This was dead wrong if ExecutorRun was
called with a non-zero tuple count; it had the effect of truncating
the query output.  To fix, give ExecutePlan control over whether to
enter parallel mode, and have it refuse to do so if the tuple count
is non-zero.  Rewrite the Gather logic so that it can cope with being
called outside parallel mode.

Commit 7aea8e4f2daa4b39ca9d1309a0c4aadb0f7ed81b is largely to blame
for this problem, though this patch modifies some subsequently-committed
code which relied on the guarantees it purported to make.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bfc78d7196eb28cd4e3d6c24f7e607bacecf1129

Modified Files
--------------
src/backend/executor/execMain.c     |   37 +++++++-----
src/backend/executor/execParallel.c |   17 ++++++
src/backend/executor/nodeGather.c   |  108 +++++++++++++++++------------------
src/include/executor/execParallel.h |    1 +
src/include/nodes/execnodes.h       |    2 +-
5 files changed, 95 insertions(+), 70 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1Zn7N3-0001pS-28@gemulon.postgresql.org>
Permalink:  ../E1Zn7N3-0001pS-28@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1Zn7N3-0001pS-28@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: rhaas@postgresql.org
  Subject: Re: pgsql: Rewrite interaction of parallel mode with parallel executor supp
  In-Reply-To: <E1Zn7N3-0001pS-28@gemulon.postgresql.org>
  References: <E1Zn7N3-0001pS-28@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