Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>,
pgsql-bugs@lists.postgresql.org
Date: 2019-01-15T18:42:56Z
Lists: pgsql-bugs
Alvaro Herrera <alvherre@2ndquadrant.com> writes: > On 2019-Jan-10, Jesper Pedersen wrote: >> However, when you use ADD CONSTRAINT FOREIGN KEY you can't use ONLY, so >> would it be a good idea to make ADD CONSTRAINT UNIQUE behave the same way, >> i.e. error out ? > 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'm having a hard time getting from "ONLY confuses me" to "nobody should be allowed to do this". I think there is a documentation and UX issue here, but I don't see that there's anything wrong with the functionality. regards, tom lane
Commits
-
Fix creation of duplicate foreign keys on partitions
- 0325d7a5957b 12.0 landed
- 4dff8935fbab 11.2 landed