From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add a Gather executor node.
Date: Wed, 30 Sep 2015 23:29:30 +0000
Message-ID: <E1ZhQoU-0002F4-Cc@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Add a Gather executor node.
A Gather executor node runs any number of copies of a plan in an equal
number of workers and merges all of the results into a single tuple
stream. It can also run the plan itself, if the workers are
unavailable or haven't started up yet. It is intended to work with
the Partial Seq Scan node which will be added in future commits.
It could also be used to implement parallel query of a different sort
by itself, without help from Partial Seq Scan, if the single_copy mode
is used. In that mode, a worker executes the plan, and the parallel
leader does not, merely collecting the worker's results. So, a Gather
node could be inserted into a plan to split the execution of that plan
across two processes. Nested Gather nodes aren't currently supported,
but we might want to add support for that in the future.
There's nothing in the planner to actually generate Gather nodes yet,
so it's not quite time to break out the champagne. But we're getting
close.
Amit Kapila. Some designs suggestions were provided by me, and I also
reviewed the patch. Single-copy mode, documentation, and other minor
changes also by me.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/3bd909b220930f21d6e15833a17947be749e7fde
Modified Files
--------------
doc/src/sgml/config.sgml | 46 ++++
src/backend/commands/explain.c | 19 ++
src/backend/executor/Makefile | 4 +-
src/backend/executor/execAmi.c | 8 +
src/backend/executor/execMain.c | 3 +
src/backend/executor/execParallel.c | 14 +-
src/backend/executor/execProcnode.c | 46 ++++
src/backend/executor/nodeGather.c | 299 +++++++++++++++++++++++++
src/backend/nodes/copyfuncs.c | 25 +++
src/backend/nodes/outfuncs.c | 14 ++
src/backend/optimizer/path/costsize.c | 38 ++++
src/backend/optimizer/plan/createplan.c | 57 +++++
src/backend/optimizer/plan/setrefs.c | 1 +
src/backend/optimizer/plan/subselect.c | 1 +
src/backend/optimizer/util/pathnode.c | 26 +++
src/backend/utils/misc/guc.c | 30 +++
src/backend/utils/misc/postgresql.conf.sample | 3 +
src/include/executor/executor.h | 1 +
src/include/executor/nodeGather.h | 25 +++
src/include/nodes/execnodes.h | 16 ++
src/include/nodes/nodes.h | 3 +
src/include/nodes/plannodes.h | 11 +
src/include/nodes/relation.h | 13 ++
src/include/optimizer/cost.h | 7 +
src/include/optimizer/pathnode.h | 3 +
src/tools/pgindent/typedefs.list | 4 +
26 files changed, 709 insertions(+), 8 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: Add a Gather executor node.
In-Reply-To: <E1ZhQoU-0002F4-Cc@gemulon.postgresql.org>
References: <E1ZhQoU-0002F4-Cc@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