From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tender Wang <tndrwang@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert
Date: Thu, 4 Jul 2024 14:17:08 +0200
Message-ID: <202407041217.tei7dtplpymg@alvherre.pgsql> (raw)
In-Reply-To: <202407031821.2grjgjjcqovc@alvherre.pgsql>
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/Attachments:
[text/x-diff] v3-0001-Cope-at-DETACH-time-for-12-16.patch (0B, ../202407041217.tei7dtplpymg@alvherre.pgsql/2-v3-0001-Cope-at-DETACH-time-for-12-16.patch)
download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: alvherre@alvh.no-ip.org, tndrwang@gmail.com, michael@paquier.xyz, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert
In-Reply-To: <202407041217.tei7dtplpymg@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox