Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert

From: "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "exclusion(at)gmail(dot)com" <exclusion(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <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-06-27 14:01:22
Message-ID: GV0P278MB0419191D74FA22588C379163D2D72@GV0P278MB0419.CHEP278.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>On Sun, 2024-06-09 at 06:00 +0000, PG Bug reporting form wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference: 18500
>> Logged by: Alexander Lakhin
>> Email address: exclusion(at)gmail(dot)com
>> PostgreSQL version: 17beta1
>> Operating system: Ubuntu 22.04
>> Description:

>FYI, I think that the same problem just happened to me with v17beta2:

>test=> CREATE TABLE p (id integer) PARTITION BY RANGE (id);
>CREATE TABLE
>test=> CREATE TABLE p_1 PARTITION OF p FOR VALUES FROM (1) TO (2);
>CREATE TABLE
>test=> ALTER TABLE p_1 ADD PRIMARY KEY (id);
>ALTER TABLE
>test=> CREATE UNIQUE INDEX ON p (id);
>CREATE INDEX
>test=> ALTER TABLE p DETACH PARTITION p_1;
>server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.

Doesn't happen on FreeBSD:

postgres=# CREATE TABLE p (id integer) PARTITION BY RANGE (id);
CREATE TABLE
postgres=# CREATE TABLE p_1 PARTITION OF p FOR VALUES FROM (1) TO (2);
CREATE TABLE
postgres=# ALTER TABLE p_1 ADD PRIMARY KEY (id);
ALTER TABLE
postgres=# CREATE UNIQUE INDEX ON p (id);
CREATE INDEX
postgres=# ALTER TABLE p DETACH PARTITION p_1;
ALTER TABLE
postgres=# \! cat /etc/os-release
NAME=FreeBSD
VERSION="14.1-RELEASE-p1"
VERSION_ID="14.1"
ID=freebsd
ANSI_COLOR="0;31"
PRETTY_NAME="FreeBSD 14.1-RELEASE-p1"
CPE_NAME="cpe:/o:freebsd:freebsd:14.1"
HOME_URL="https://FreeBSD.org/"
BUG_REPORT_URL="https://bugs.FreeBSD.org/"
postgres=#

Regards
Daniel

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2024-06-27 14:55:24 Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert
Previous Message Laurenz Albe 2024-06-27 13:54:17 Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert