On 18 April 2018 at 13:03, David G. Johnston <david.g.johns...@gmail.com> wrote: > My initial reaction is that we need to fix the bug introduced in v10 - > leaving constraint_exclusion working as it has historically and not affect > the new-as-of-10 ability to prune (maybe better termed as skip...) > partitions known during execution to contain no qualified tuples.
Can you explain which bug in PG10 you are talking about? Did you perhaps mean PG11? I'm not onboard with overloading the constraint_exclusion GUC any further to mean something it shouldn't. The PG11 partition pruning code does not use CHECK constraints to eliminate partitions, so I see no reason why constraint_exclusion should turn it on or off. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services