Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT - Mailing list pgsql-bugs

From Jesper Pedersen
Subject Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT
Date
Msg-id be81b47a-c6ae-b88e-54d9-06ab4298a5de@redhat.com
Whole thread Raw
In response to Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
Hi,

On 1/15/19 2:35 PM, Alvaro Herrera wrote:
> On 2019-Jan-15, Tom Lane wrote:
>> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>>> I haven't investigated this angle.  It seems more complex than just a
>>> simple bugfix, right?
>>
>> Wouldn't that be throwing away the entire point of the ONLY behavior,
>> ie to allow the component indexes to be built one at a time, without
>> holding locks across the whole partition tree?
> 
> I now see that Jesper was talking about a completely different thing
> than I was thinking.  I agree with you there -- it makes no sense to
> reject that command ... particularly because pg_dump uses it.
> 

I now think Tom is correct that it is UX and documentation issue, and 
changing the existing behavior is probably not a good thing.

Changing "invalid" to "incomplete" would be a good idea. Maybe "partial" 
could be a good descriptor if not all partitions shares the unique 
constraint.

Best regards,
  Jesper


pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT