Re: Problem with default partition pruning
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
Simon Riggs <simon@2ndquadrant.com>, yuzuko <yuzukohosoya@gmail.com>, shawn wang <shawn.wang.pg@gmail.com>, Shawn Wang <shawn.wang@highgo.ca>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-08-09T04:17:41Z
Lists: pgsql-hackers
Attachments
- v2-0001-Improve-RelOptInfo.partition_qual-usage.patch (application/octet-stream) patch v2-0001
- v2-0002-Improve-constraint-exclusion-usage-in-partprune.c.patch (application/octet-stream) patch v2-0002
Horiguchi-san, Thanks for the review. On Fri, Aug 9, 2019 at 12:09 PM Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote: > At Thu, 8 Aug 2019 14:50:54 +0900, Amit Langote wrote: > > When working on it, I realized > > that the way RelOptInfo.partition_qual is processed is a bit > > duplicative, so I created a separate patch to make that a bit more > > consistent. > > 0001 seems reasonable. By the way, the patch doesn't touch > get_relation_constraints(), but I suppose it can use the modified > partition constraint qual already stored in rel->partition_qual > in set_relation_partition_info. And we could move constifying to > set_rlation_partition_info? Ah, good advice. This make partition constraint usage within the planner quite a bit more consistent. > Also, I'd like to see comments that the partition_quals is > already varnode-fixed. Added a one-line comment. > And 0002, yeah, just +1 from me. Thanks. Attached updated patches; only 0001 changed per above comments. Regards, Amit
Commits
-
Don't constraint-exclude partitioned tables as much
- 815ef2f568c7 13.0 landed
-
Apply constraint exclusion more generally in partitioning
- 4e85642d935e 13.0 landed
-
Improve pruning of a default partition
- e3967a16d3a0 11.5 landed
- 86544071484a 12.0 landed
- 489247b0e615 13.0 landed
-
Doc: Fix event trigger firing table
- 44460d7017cd 13.0 cited
-
Remove obsolete nbtree insertion comment.
- 489e431ba56b 12.0 cited