Assorted preparatory refactoring for partition-wise join.
Robert Haas <rhaas@postgresql.org>
Assorted preparatory refactoring for partition-wise join. Instead of duplicating the logic to search for a matching ParamPathInfo in multiple places, factor it out into a separate function. Pass only the relevant bits of the PartitionKey to partition_bounds_equal instead of the whole thing, because partition-wise join will want to call this without having a PartitionKey available. Adjust allow_star_schema_join and calc_nestloop_required_outer to take relevant Relids rather than the entire Path, because partition-wise join will want to call it with the top-parent relids to determine whether a child join is allowable. Ashutosh Bapat. Review and testing of the larger patch set of which this is a part by Amit Langote, Rajkumar Raghuwanshi, Rafia Sabih, Thomas Munro, Dilip Kumar, and me. Discussion: http://postgr.es/m/CA+TgmobQK80vtXjAsPZWWXd7c8u13G86gmuLupN+uUJjA+i4nA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/partition.c | modified | +4 −5 |
| src/backend/optimizer/path/joinpath.c | modified | +14 −13 |
| src/backend/optimizer/util/pathnode.c | modified | +6 −5 |
| src/backend/optimizer/util/relnode.c | modified | +26 −19 |
| src/backend/utils/cache/relcache.c | modified | +3 −1 |
| src/include/catalog/partition.h | modified | +3 −2 |
| src/include/optimizer/pathnode.h | modified | +6 −1 |
Discussion
- Partition-wise join for join between (declaratively) partitioned tables 171 messages · 2016-06-15 → 2017-08-10