From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Push tuple limits through Gather and Gather Merge.
Date: Tue, 29 Aug 2017 17:20:09 +0000
Message-ID: <E1dmkBN-0005nU-7u@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Push tuple limits through Gather and Gather Merge.
If we only need, say, 10 tuples in total, then we certainly don't need
more than 10 tuples from any single process. Pushing down the limit
lets workers exit early when possible. For Gather Merge, there is
an additional benefit: a Sort immediately below the Gather Merge can
be done as a bounded sort if there is an applicable limit.
Robert Haas and Tom Lane
Discussion: http://postgr.es/m/CA+TgmoYa3QKKrLj5rX7UvGqhH73G1Li4B-EKxrmASaca2tFu9Q@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3452dc5240da43e833118484e1e9b4894d04431c
Modified Files
--------------
src/backend/executor/execParallel.c | 54 +++++++++---
src/backend/executor/execProcnode.c | 121 ++++++++++++++++++++++++++
src/backend/executor/nodeGather.c | 4 +-
src/backend/executor/nodeGatherMerge.c | 4 +-
src/backend/executor/nodeLimit.c | 98 ++++-----------------
src/include/executor/execParallel.h | 2 +-
src/include/executor/executor.h | 1 +
src/include/nodes/execnodes.h | 2 +
src/test/regress/expected/select_parallel.out | 24 ++++-
src/test/regress/sql/select_parallel.sql | 9 +-
10 files changed, 222 insertions(+), 97 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: Push tuple limits through Gather and Gather Merge.
In-Reply-To: <E1dmkBN-0005nU-7u@gemulon.postgresql.org>
References: <E1dmkBN-0005nU-7u@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