Re: Should we add GUCs to allow partition pruning to be disabled? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Should we add GUCs to allow partition pruning to be disabled?
Date
Msg-id 20180510144931.i3b3xom6bbt3bif6@alvherre.pgsql
Whole thread Raw
In response to Re: Should we add GUCs to allow partition pruning to be disabled?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Should we add GUCs to allow partition pruning to be disabled?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Robert Haas wrote:

> In defense of constraint exclusion, let me note that constraint
> exclusion is not restricted to inheritance cases.  It could eliminate
> the need to scan a completely unpartitioned table if the WHERE clause
> can be refuted by CHECK constraints.  It could eliminate the need to
> scan some partitions of a partitioned table based on whatever
> additional CHECK constraints exist beyond the partitioning
> constraints.

This is a great point that hadn't occurred to me.  It means that we
should keep constraint exclusion on its own <sect2> rather than relegate
it to <sect3>, as my proposed patch does.  I think it's a good idea to
add this point there too.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Indexes on partitioned tables and foreign partitions
Next
From: Heikki Linnakangas
Date:
Subject: Re: Considering signal handling in plpython again