On 2018/02/13 20:08, Amit Langote wrote:
> On 2018/02/09 21:36, Amit Langote wrote:
>> 0004-Faster-partition-pruning.patch
>>
>> The main patch that adds src/backend/optimizer/util/partprune.c, a module
>> to provide the functionality that will replace the current approach of
>> calling relation_excluded_by_constraints() for each partition.
>>
>> Sorry, but there is still this big TODO here, which I'll try to fix early
>> next week.
>>
>> + * partprune.c
>> + * Provides functions to prune partitions of a partitioned table by
>> + * comparing provided set of clauses with the table's partitions'
>> + * boundaries
>> + *
>> + * TODO: write a longer description of things in this file
>
> And I tried to fix that to some degree in the attached updated version.
Here is an updated version.
I realized that 0005 (Add only unpruned partitioned child rels to
partitioned_rels) did that only for (Merge)Append. That is, it didn't
handle ModifyTable. I fixed that by teaching inheritance_planner() to do
it. In the process, I found out that we don't need the
PartitionedChildRelInfo node and related code anymore, so the patch ended
up removing more code than adding it.
Thanks,
Amit