Re: expanding inheritance in partition bound order
Amit Langote <langote_amit_f8@lab.ntt.co.jp>
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Amit Khandekar <amitdkhan.pg@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-09-08T10:23:34Z
Lists: pgsql-hackers
Attachments
- 0001-Decouple-RelationGetPartitionDispatchInfo-from-execu.patch (text/plain) patch 0001
- 0002-Make-RelationGetPartitionDispatch-expansion-order-de.patch (text/plain) patch 0002
On 2017/09/05 14:11, Amit Khandekar wrote: > Great, thanks. Just wanted to make sure someone is working on that, > because, as you said, it is no longer an EIBO patch. Since you are > doing that, I won't work on that. Here is that patch (actually two patches). Sorry it took me a bit. Description: [PATCH 1/2] Decouple RelationGetPartitionDispatchInfo() from executor Currently it and the structure it generates viz. PartitionDispatch objects are too coupled with the executor's tuple-routing code. In particular, it's pretty undesirable that it makes it the responsibility of the caller to release some resources, such as executor tuple table slots, tuple-conversion maps, etc. After this refactoring, ExecSetupPartitionTupleRouting() now needs to do some of the work that was previously done in RelationGetPartitionDispatchInfo(). [PATCH 2/2] Make RelationGetPartitionDispatch expansion order depth-first This is so as it matches what the planner is doing with partitioning inheritance expansion. Matching with planner order helps because it helps ease matching the executor's per-partition objects with planner-created per-partition nodes. Actually, I'm coming to a conclusion that we should keep any whole-partition-tree stuff out of partition.c and its interface, as Robert has also alluded to in an earlier message on this thread [1]. But since that's a different topic, I'll shut up about it on this thread and start a new thread to discuss what kind of code rearrangement is possible. Thanks, Amit [1] https://www.postgresql.org/message-id/CA%2BTgmoafr%3DhUrM%3Dcbx-k%3DBDHOF2OfXaw95HQSNAK4mHBwmSjtw%40mail.gmail.com
Commits
-
Make RelationGetPartitionDispatchInfo expand depth-first.
- 77b6b5e9ceca 11.0 landed
-
Expand partitioned tables in PartDesc order.
- 30833ba154e0 11.0 landed
-
Don't lock tables in RelationGetPartitionDispatchInfo.
- 7c0ca2900f7c 10.0 landed
- 54cde0c4c058 11.0 landed
-
Speed up dropping tables with many partitions.
- c1e0e7e1d790 10.0 cited