Re: default range partition and constraint exclusion

2017-11-28 Thread Amit Langote
On 2017/11/29 0:52, Robert Haas wrote: > On Mon, Nov 27, 2017 at 4:01 PM, Robert Haas wrote: >> I am out of time for today but will try to look at this some more tomorrow. > > Upon closer study this seems to definitely be a correct fix, so I have > committed it. Apologies

Re: default range partition and constraint exclusion

2017-11-28 Thread Robert Haas
On Mon, Nov 27, 2017 at 4:01 PM, Robert Haas wrote: > I am out of time for today but will try to look at this some more tomorrow. Upon closer study this seems to definitely be a correct fix, so I have committed it. Apologies for my earlier confusion. -- Robert Haas

Re: default range partition and constraint exclusion

2017-11-28 Thread Amit Langote
Horiguchi-san, thanks for the clarifying comment. On 2017/11/27 18:04, Kyotaro HORIGUCHI wrote: > At Fri, 24 Nov 2017 10:49:07 -0500, Robert Haas wrote >> OK, so I am still confused about whether the constraint is wrong or >> the constraint exclusion logic is wrong. One of them, at least, has >>

Re: default range partition and constraint exclusion

2017-11-27 Thread Robert Haas
On Mon, Nov 27, 2017 at 4:04 AM, Kyotaro HORIGUCHI wrote: > This is the story in my understanding. Thanks, that's helpful. Sorry I didn't have time yet to study this in detail myself. If we're routing tuples to a partition for which the partition constraint is

Re: default range partition and constraint exclusion

2017-11-24 Thread Robert Haas
On Wed, Nov 22, 2017 at 4:21 AM, Amit Langote wrote: >>> If all predicate_refuted_by() receives is the expression tree (AND/OR) >>> with individual nodes being strict clauses involving partition keys (and >>> nothing about the nullness of the keys), the downstream

Re: default range partition and constraint exclusion

2017-11-21 Thread Robert Haas
On Tue, Nov 21, 2017 at 4:36 AM, Amit Langote wrote: >>> The attached will make the constraint to look like: >> >> Uh, if the constraint exclusion logic we're using is drawing false >> conclusions, we need to fix it so it doesn't, not change the >> constraint so

Re: default range partition and constraint exclusion

2017-11-21 Thread Amit Langote
On 2017/11/18 8:28, Robert Haas wrote: > On Fri, Nov 17, 2017 at 12:57 AM, Amit Langote > wrote: >> While working on the patch for partition pruning for declarative >> partitioned tables, I noticed that default range partition will fail to be >> included in a plan

Re: default range partition and constraint exclusion

2017-11-17 Thread Robert Haas
On Fri, Nov 17, 2017 at 12:57 AM, Amit Langote wrote: > While working on the patch for partition pruning for declarative > partitioned tables, I noticed that default range partition will fail to be > included in a plan in certain cases due to pruning by constraint

default range partition and constraint exclusion

2017-11-16 Thread Amit Langote
Hi. While working on the patch for partition pruning for declarative partitioned tables, I noticed that default range partition will fail to be included in a plan in certain cases due to pruning by constraint exclusion. Consider a multi-column range-partitioned table: create table mc2p (a int,