From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Don't constraint-exclude partitioned tables as much |
Date: | 2019-08-13 15:22:04 |
Message-ID: | E1hxYce-0006MY-Nk@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Don't constraint-exclude partitioned tables as much
We only need to invoke constraint exclusion on partitioned tables when
they are a partition, and they themselves contain a default partition;
it's not necessary otherwise, and it's expensive, so avoid it. Also, we
were trying once for each clause separately, but we can do it for all
the clauses at once.
While at it, centralize setting of RelOptInfo->partition_qual instead of
computing it in slightly different ways in different places.
Per complaints from Simon Riggs about 4e85642d935e; reviewed by Yuzuko
Hosoya, Kyotaro Horiguchi.
Author: Amit Langote. I (Álvaro) again mangled the patch somewhat.
Discussion: https://postgr.es/m/CANP8+j+tMCY=nEcQeqQam85=uopLBtX-2vHiLD2bbp7iQQUKpA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/815ef2f568c754dcb539cca574f1982317d74db6
Modified Files
--------------
src/backend/optimizer/util/plancat.c | 59 ++++++++++++++++++++----------
src/backend/partitioning/partprune.c | 71 +++++++++++++-----------------------
2 files changed, 65 insertions(+), 65 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2019-08-13 18:57:00 | pgsql: Use PageIndexTupleOverwrite() within nbtree. |
Previous Message | Peter Eisentraut | 2019-08-13 06:49:24 | pgsql: Update to DocBook 4.5 |