Hi David.
On 2018/04/09 12:48, David Rowley wrote:
> While looking at the docs in [1], I saw that we still mention:
>
> 4. Ensure that the constraint_exclusion configuration parameter is not
> disabled in postgresql.conf. If it is, queries will not be optimized
> as desired.
>
> This is no longer true. The attached patch removed it.
>
> [1] https://www.postgresql.org/docs/10/static/ddl-partitioning.htm
Thanks. I was aware of the changes that would need to be made, but you
beat me to writing the patch itself.
About the patch:
While the users no longer need to enable constraint_exclusion true for
select queries, one would still need it for update/delete queries, because
the new pruning logic only gets invoked for the former. Alas...
Also, further down on that page, there is a 5.10.4 Partitioning and
Constraint Exclusion sub-section. I think it would also need some tweaks
due to new developments.
I updated your patch to fix that. Please take a look.
Thanks,
Amit