Thank you both of you for looking at this. On 21 April 2018 at 06:28, Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote: > + {"enable_partition_pruning", PGC_USERSET, QUERY_TUNING_METHOD, > + gettext_noop("Enables the planner's ability to remove > non-required partitions from the query plan."), > + NULL > + }, > + &enable_partition_pruning, > + true, > + NULL, NULL, NULL > + }, > > I would make the short description shorter, and use the long description > to elaborate. So gettext_noop("Enable plan-time and run-time partition > pruning.") > followed by something like > > gettext_noop("Allows the query planner and executor to compare partition > bounds to conditions in the query, and determine which partitions {can be > skipped | must be scanned} ...")
I've taken a slight variation of this, but instead of ", and" I used "to" and went with the "must be scanned" option. select * from pg_settings where name like 'enable%'; does show that this is the only enable_* GUC to have a long description, but perhaps that does not matter. On 20 April 2018 at 20:51, Amit Langote <langote_amit...@lab.ntt.co.jp> wrote: > set constraint_exclusion to off; > > -- not ok! It needed a bit more effort than I put in the first time around to make this work properly. constraint_exclusion = 'off' becomes a bit of a special case for partitioned tables now. To make this work I had to get rid of hasInheritedTarget and make a new enum that tracks if we're inheritance planning for an inheritance parent or a partitioned table. We can't simply only set hasInheritedTarget to true when planning with inheritance parents as constraint_exclusion = 'partition' must still know that we're planning using the inheritance planner. v2 patch attached. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
v2-0001-Add-GUC-to-allow-partition-pruning-to-be-disabled.patch
Description: Binary data