From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Improve run-time partition pruning to handle any stable expressi |
Date: | 2018-06-10 19:22:44 |
Message-ID: | E1fS5vI-0007eJ-BZ@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-06-10 20:30:29 | pgsql: Relocate partition pruning structs to a saner place. |
Previous Message | Michael Paquier | 2018-06-10 13:52:27 | pgsql: Fix grammar in REVOKE documentation |