On 2019/03/30 0:29, Tom Lane wrote:
> Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
>> Finally, it's not in the patch, but how about visiting
>> get_relation_constraints() for revising this block of code:
>
> That seems like probably an independent patch --- do you want to write it?
Here is that patch.
It revises get_relation_constraints() such that the partition constraint
is loaded in only the intended cases. To summarize:
* PG 11 currently misses one such intended case (select * from partition)
causing a *bug* that constraint exclusion fails to exclude the partition
with constraint_exclusion = on
* HEAD loads the partition constraint even in some cases where 428b260f87
rendered doing that unnecessary
Thanks,
Amit