From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve run-time partition pruning to handle any stable expressi
Date: Sun, 10 Jun 2018 19:22:44 +0000
Message-ID: <E1fS5vI-0007eJ-BZ@gemulon.postgresql.org> (raw)
Improve run-time partition pruning to handle any stable expression.
The initial coding of the run-time-pruning feature only coped with cases
where the partition key(s) are compared to Params. That is a bit silly;
we can allow it to work with any non-Var-containing stable expression, as
long as we take special care with expressions containing PARAM_EXEC Params.
The code is hardly any longer this way, and it's considerably clearer
(IMO at least). Per gripe from Pavel Stehule.
David Rowley, whacked around a bit by me
Discussion: https://postgr.es/m/CAFj8pRBjrufA3ocDm8o4LPGNye9Y+pm1b9kCwode4X04CULG3g@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/73b7f48f78d27b1baf1a6541cbaae0fe6bd6186d
Modified Files
--------------
src/backend/executor/execPartition.c | 248 ++++++++++++++------------
src/backend/executor/nodeAppend.c | 53 +++---
src/backend/nodes/copyfuncs.c | 7 +-
src/backend/nodes/outfuncs.c | 10 +-
src/backend/nodes/readfuncs.c | 7 +-
src/backend/partitioning/partprune.c | 219 ++++++++++++++---------
src/include/executor/execPartition.h | 38 ++--
src/include/nodes/primnodes.h | 12 +-
src/include/partitioning/partprune.h | 20 ++-
src/test/regress/expected/partition_prune.out | 90 +++++++++-
src/test/regress/sql/partition_prune.sql | 28 ++-
11 files changed, 461 insertions(+), 271 deletions(-)
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: Improve run-time partition pruning to handle any stable expressi
In-Reply-To: <E1fS5vI-0007eJ-BZ@gemulon.postgresql.org>
References: <E1fS5vI-0007eJ-BZ@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