Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-10-12 Thread Amit Langote
On 2017/10/13 4:18, Robert Haas wrote: > On Thu, Oct 5, 2017 at 9:29 PM, Amit Langote > wrote: >> Attached a patch to modify the INFO messages in check_default_allows_bound. > > Committed. However, I didn't see a reason to adopt the comment change > you proposed,

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-10-12 Thread Robert Haas
On Thu, Oct 5, 2017 at 9:29 PM, Amit Langote wrote: > Attached a patch to modify the INFO messages in check_default_allows_bound. Committed. However, I didn't see a reason to adopt the comment change you proposed, so I left that part out. -- Robert Haas

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-10-05 Thread Amit Langote
On 2017/10/06 2:25, Robert Haas wrote: > On Tue, Sep 26, 2017 at 4:27 AM, Amit Langote wrote: >> I guess we don't need to squash, as they could be seen as implementing >> different features. Reordering the patches helps though. So, apply them >> in this order: >> >> 1. My patch to teach

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-10-05 Thread Robert Haas
On Tue, Sep 26, 2017 at 4:27 AM, Amit Langote wrote: > On 2017/09/16 1:57, Amit Langote wrote: >> On Sat, Sep 16, 2017 at 12:59 AM, Robert Haas wrote: >>> I believe the intended advantage of the current system is that if you >>> specify

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-26 Thread Amit Langote
On 2017/09/16 1:57, Amit Langote wrote: > On Sat, Sep 16, 2017 at 12:59 AM, Robert Haas wrote: >> I believe the intended advantage of the current system is that if you >> specify multiple operations in a single ALTER TABLE command, you only >> do one scan rather than having

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-15 Thread Amit Langote
On Sat, Sep 16, 2017 at 12:59 AM, Robert Haas wrote: > On Fri, Sep 15, 2017 at 2:00 AM, Amit Langote > wrote: >> I wonder if we should call check_default_allows_bound() from >> ATExecAttachPartition(), too, instead of validating updated

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-15 Thread Robert Haas
On Fri, Sep 15, 2017 at 2:00 AM, Amit Langote wrote: > I wonder if we should call check_default_allows_bound() from > ATExecAttachPartition(), too, instead of validating updated default > partition constraint using ValidatePartitionConstraints()? That is, call >

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-15 Thread Amit Langote
On 2017/09/15 0:59, Robert Haas wrote: > On Thu, Sep 14, 2017 at 4:03 AM, Jeevan Ladhe > wrote: >> Thanks Amit for reviewing. >>> Patch looks fine to me. By the way, why don't we just say "Can we skip >>> scanning part_rel?" in the comment before the newly added

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-14 Thread Robert Haas
On Thu, Sep 14, 2017 at 4:03 AM, Jeevan Ladhe wrote: > Thanks Amit for reviewing. >> Patch looks fine to me. By the way, why don't we just say "Can we skip >> scanning part_rel?" in the comment before the newly added call to >>

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-14 Thread Jeevan Ladhe
Thanks Amit for reviewing. Patch looks fine to me. By the way, why don't we just say "Can we skip > scanning part_rel?" in the comment before the newly added call to > PartConstraintImpliedByRelConstraint()? We don't need to repeat the > explanation of what it does at the every place we call

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-13 Thread Amit Langote
Hi Jeevan, On 2017/09/12 18:22, Jeevan Ladhe wrote: > Commit 6f6b99d1335be8ea1b74581fc489a97b109dd08a introduced default > partitioning support. This commit added a new function > check_default_allows_bound(), > which checks if there exists a row in the default partition that would > belong to >