On Tue, Apr 24, 2018 at 5:59 PM, Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote: > Constraint > exclusion was pretty easy to get wrong, hence the need for a separate > section, and I suppose the new partition pruning may be prey to the same > problems, so it seems worth to document them specially. But not sure > about the others, if they are mostly debugging tools.
Weighing in here late, but I have a hard time understanding why we want a GUC to control partition pruning at all. With constraint exclusion, the issue is whether you want to spend planner cycles to try to deduce things using CHECK constraints when, quite possibly, your CHECK constraints are unrelated to table inheritance and thus won't help. But seems extremely unlikely that the same thing would happen with partition pruning. Unlike your CHECK constraints, your partition bounds are, by definition, potentially useful for pruning. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company