Re: Partition-wise join for join between (declaratively) partitioned tables
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Attachments
- pg_dp_join_v3.patch (invalid/octet-stream) patch v3
> ../../../../src/include/catalog/partition.h:37: error: redefinition of > typedef ‘PartitionScheme’ > ../../../../src/include/nodes/relation.h:492: note: previous declaration of > ‘PartitionScheme’ was here [...] > > PS : I am using - gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17) Thanks for the report. For some reason, I am not getting these errors with my compiler [ashutosh@ubuntu regress]gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Anyway, I have fixed it in the attached patch. The patch is based on sources upto commit commit 2a7f4f76434d82eb0d1b5f4f7051043e1dd3ee1a Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> Date: Wed Sep 21 13:24:13 2016 +0300 and Amit Langote's set of patches posted on 15th Sept. 2016 [1] There are few implementation details that need to be worked out like 1. adjust_partitionrel_attrs() calls adjust_appendrel_attrs() as many times as the number of base relations in the join, possibly producing a new expression tree in every call. It can be optimized to call adjust_appendrel_attrs() only once. I will work on that if reviewers agree that adjust_partitionrel_attrs() is needed and should be optimized. 2. As mentioned in earlier mails, the paths parameterized by parent partitioned table are translated to be parameterized by child partitions. That code needs to support more kinds of paths. I will work on that, if reviewers agree that the approach of translating paths is acceptable. 3. Because of an issue with declarative partitioning patch [2] multi-level partition table tests are failing in partition_join.sql. Those were not failing with an earlier set of patches supporting declarative partitions. Those will be fixed based on the discussion in that thread. 4. More tests for foreign tables as partitions and for multi-level partitioned tables. 5. The tests use unpartitioned tables for verifying results. Those tables and corresponding SQL statements will be removed once the tests are finalised. [1]. https://www.postgresql.org/message-id/e5c1c9cf-3f5a-c4d7-6047-7351147aaef9%40lab.ntt.co.jp [2]. https://www.postgresql.org/message-id/CAFjFpRc%3DT%2BCjpGNkNSdOkHza8VAPb35bngaCdAzPgBkhijmJhg%40mail.gmail.com -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company
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