Re: BUG #16276: Server crash on an invalid attempt to attach apartition to an index - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #16276: Server crash on an invalid attempt to attach apartition to an index
Date
Msg-id 20200226080624.GH17153@paquier.xyz
Whole thread Raw
In response to BUG #16276: Server crash on an invalid attempt to attach a partition to an index  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #16276: Server crash on an invalid attempt to attach apartition to an index  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
On Tue, Feb 25, 2020 at 04:00:01PM +0000, PG Bug reporting form wrote:
> The following query:
> create table idxpart(a int) partition by list (a);
> create index idxpart_idx on idxpart (a);
> create table idxpart1(a int);
> alter table idxpart_idx attach partition idxpart1 for values in (0);
>
> leads to a server crash with the following stack trace:
> Core was generated by `postgres: law regression [local] ALTER TABLE

Attempting to attach a table to a partitioned index?  Nice thought.
Without the assertion, RangeVarCallbackForAttachIndex complains that
the relation is not an index, which is right, so I would be tempted to
just remove the culprit assertion.  Any thoughts?
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: BUG #16278: SOCKET ISSUE
Next
From: Krishnanunni Radhakrishnan
Date:
Subject: Re: BUG #16274: Repeated Libraries in Mac