From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Tender Wang <tndrwang(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert |
Date: | 2024-07-04 12:17:08 |
Message-ID: | 202407041217.tei7dtplpymg@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Doh, somehow I forgot the patches once again. Here they are. I intend
to push 0001 to all relevant branches soon, then park the rest until we
have ALTER TABLE ... ADD PRIMARY KEY USING INDEX.
On 2024-Jul-03, Alvaro Herrera wrote:
> So here are three patches. 0001 adds a check at DETACH time so that if
> a constraint has the form that we don't want to see, it copes without
> crashing in the way Tender suggested. The code is different though,
> mainly because we don't need his proposed has_superclass() function. It
> also adds the test cases, and leaves one of the tables from it so that
> pg_upgrade is tested.
>
> 0002 is the code that throws an error in any of the three problem cases;
> roughly the same as the patch I posted as 0001 upthread. This is
> incomplete in the sense that the regression tests would fail with it,
> because I didn't modify the results. (I think we'd also remove the
> DETACH line from those tests, because it'd be useless).
>
> 0003 adds the pg_upgrade check I mentioned: it scans the databases in
> the source cluster for any constraints of the bogus form and fails the
> upgrade if any exist. I tested this one very lightly (that is to say,
> only with the database state left by the tests in 0001).
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Cope-at-DETACH-time-for-12-16.patch | text/x-diff | 5.9 KB |
v3-0002-WIP-don-t-let-constraint-indexes-attach-to-raw-in.patch | text/x-diff | 5.0 KB |
v3-0003-Have-pg_upgrade-fail-when-bad-constraints-are-pre.patch | text/x-diff | 4.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Wienhold | 2024-07-04 12:20:35 | Re: BUG #18529: Can not install as Document |
Previous Message | Tender Wang | 2024-07-04 07:57:05 | Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert |