On 13 July 2018 at 17:49, Tsunakawa, Takayuki <tsunakawa.ta...@jp.fujitsu.com> wrote: > David has submitted multiple patches for PG 12, one of which speeds up > pruning of UPDATE/DELETE (I couldn't find it in the current CF, though.) > What challenges are there for future versions, and which of them are being > addressed by patches in progress for PG 12, and which issues are untouched?
I've not submitted that for PG12 yet. I had other ideas about just getting rid of the inheritance planner altogether, but so far don't have a patch for that. Still uncertain if there are any huge blockers to that either. Join search needs performed multiple times, but a good advantage will be that we can take advantage of partition pruning to only join search the non-pruned partitions. The reason I change my mind about the patch you're talking about is that it meant that RangeTblEntries needed to keep the same relation id in the inheritance planner as they did in the grouping planner, and another patch I have semi-baked delays building both RelOptInfo and RangeTblEntry records for partitions until after pruning. Without the RangeTblEntry it was difficult to ensure the relids were in lock-step between the two planners. There are ways to do it, it just didn't look pretty. Hoping to have something later in the cycle. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services