Re: Partition-wise join for join between (declaratively) partitioned tables
Amit Langote <langote_amit_f8@lab.ntt.co.jp>
Attachments
- 0012-Multi-level-partitioned-table-expansion.patch (text/x-diff)
Hi Ashutosh, On 2017/03/23 21:48, Ashutosh Bapat wrote: >>> I have fixed all the issues reported till now. I've tried to fix your 0012 patch (Multi-level partitioned table expansion) considering your message earlier on this thread [1]. Especially the fact that no AppendRelInfo and RelOptInfo are allocated for partitioned child tables as of commit d3cc37f1d [2]. I've fixed expand_inherited_rtentry() such that AppendRelInfo *is* allocated for a partitioned child RTEs whose rte->inh is set to true. Such an RTE is recursively expanded with that RTE the parent. Also as I mentioned elsewhere [3], the multi-level inheritance expansion of partitioned table will break update/delete for partitioned table, which is because inheritance_planner() is not ready to handle inheritance sets structured that way. I tried to refactor inheritance_planner() such that its core logic can be recursively invoked for partitioned child RTEs. The resulting child paths and other auxiliary information related to planning across the hierarchy are maintained in one place using a struct to hold the same in a few flat lists. The refactoring didn't break any existing tests and a couple of new tests are added to check that it indeed works for multi-level partitioned tables expanded using new multi-level structure. There is some test failure in 0014 (Multi-level partition-wise join tests), probably because of the changes I made to 0012, which I didn't get time to check why, although I've checked using an example that multi-level join planning still works, so it's not completely broken either. Thanks, Amit [1] https://www.postgresql.org/message-id/CAFjFpRefs5ZMnxQ2vP9v5zOtWtNPuiMYc01sb1SWjCOB1CT%3DuQ%40mail.gmail.com [2] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d3cc37f1d [3] https://www.postgresql.org/message-id/744d20fe-fc7b-f89e-8d06-6496ec537b86%40lab.ntt.co.jp
Commits
-
Basic partition-wise join functionality.
- f49842d1ee31 11.0 landed
-
Assorted preparatory refactoring for partition-wise join.
- e139f1953f29 11.0 landed
-
Teach adjust_appendrel_attrs(_multilevel) to do multiple translations.
- 480f1f4329f1 11.0 landed
-
Stamp 10beta2.
- 42171e2cd23c 10.0 cited
-
Eat XIDs more efficiently in recovery TAP test.
- 08aed6604de2 10.0 cited
-
Abstract logic to allow for multiple kinds of child rels.
- 7a39b5e4d112 10.0 landed
-
Implement SortSupport for macaddr data type
- f90d23d0c518 10.0 cited
-
Attempt to stabilize grouping sets regression test plans.
- de4da168d57d 10.0 cited
-
Teach xlogreader to follow timeline switches
- 1148e22a82ed 10.0 cited
-
Don't scan partitioned tables.
- d3cc37f1d801 10.0 cited
-
Fix grammar.
- b4ff8609dbad 10.0 cited
-
postgres_fdw: Push down FULL JOINs with restriction clauses.
- b30fb56b07a8 10.0 cited
-
Some preliminary refactoring towards partitionwise join.
- c44c47a773bd 10.0 landed
-
contrib/amcheck needs RecentGlobalXmin to be PGDLLIMPORT'ified.
- 56018bf26eec 10.0 cited
-
Print test parameters like "foo: 123", and results like "foo = 123".
- 2a7f4f76434d 10.0 cited