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+i...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e139f1953f29db245f60a7acb72fccb1e05d2442 Modified Files -------------- src/backend/catalog/partition.c | 9 ++++--- src/backend/optimizer/path/joinpath.c | 27 +++++++++++---------- src/backend/optimizer/util/pathnode.c | 11 +++++---- src/backend/optimizer/util/relnode.c | 45 ++++++++++++++++++++--------------- src/backend/utils/cache/relcache.c | 4 +++- src/include/catalog/partition.h | 5 ++-- src/include/optimizer/pathnode.h | 7 +++++- 7 files changed, 62 insertions(+), 46 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers