Amit Langote wrote: > Some comments on the code reorganizing part of the patch: > > * Did you intentionally not put PartitionBoundInfoData and its accessor > macros in partition_internal.h. partprune.c would not need to include > partition.h if we do that.
Not really. After pondering this some more, I decided to call the new file src/include/partition/partbounds.h; and the other new file will become src/include/partition/partprune.h. This leads naturally to the idea that PartitionBoundInfoData will be in partbounds.h. However, the typedef struct PartitionBoundInfoData *PartitionBoundInfo will have to remain in catalog/partition.h, at least for the time being. > * Also, I wonder why you left PartitionPruneContext in partition.h. Isn't > it better taken out to partprune.h? Yes. > * Why isn't gen_partprune_steps() in partprune.h? I see only > prune_append_rel_partitions() exported out of partprune.c, but the runtime > patch needs gen_partprune_steps() to be called from createplan.c. > * I don't see get_matching_partitions() exported either. Runtime pruning > patch needs that too. True -- both exported. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services