• Alvaro Herrera's avatar
    Add GUC enable_partition_pruning · 055fb8d3
    Alvaro Herrera authored
    This controls both plan-time and execution-time new-style partition
    pruning.  While finer-grain control is possible (maybe using an enum GUC
    instead of boolean), there doesn't seem to be much need for that.
    
    This new parameter controls partition pruning for all queries:
    trivially, SELECT queries that affect partitioned tables are naturally
    under its control since they are using the new technology.  However,
    while UPDATE/DELETE queries do not use the new code, we make the new GUC
    control their behavior also (stealing control from
    constraint_exclusion), because it is more natural, and it leads to a
    more natural transition to the future in which those queries will also
    use the new pruning code.
    
    Constraint exclusion still controls pruning for regular inheritance
    situations (those not involving partitioned tables).
    
    Author: David Rowley
    Review: Amit Langote, Ashutosh Bapat, Justin Pryzby, David G. Johnston
    Discussion: https://postgr.es/m/CAKJS1f_0HwsxJG9m+nzU+CizxSdGtfe6iF_ykPYBiYft302DCw@mail.gmail.com
    055fb8d3
config.sgml 383 KB