Re: BUG #15684: Server crash on DROP partitioned table - Mailing list pgsql-bugs

From Amit Langote
Subject Re: BUG #15684: Server crash on DROP partitioned table
Date
Msg-id b5728427-39cf-255e-c544-97efc9410d3f@lab.ntt.co.jp
Whole thread Raw
In response to Re: BUG #15684: Server crash on DROP partitioned table  (Alexander Lakhin <exclusion@gmail.com>)
List pgsql-bugs
On 2019/03/11 4:15, Alexander Lakhin wrote:
> 10.03.2019 22:04, Julien Rouhaud wrote:
>> Hi,
>>
>> On Sun, Mar 10, 2019 at 7:55 PM PG Bug reporting form
>> <noreply@postgresql.org> wrote:
>>> The following query:
>>> create table at_partitioned (a int, b text) partition by range (a);
>>> create table at_part_1 partition of at_partitioned for values from (0) to
>>> (1000);
>>> create table at_part_2 partition of at_partitioned for values from (1000) to
>>> (2000);
>>> create index on at_partitioned (b);
>>> alter table at_partitioned alter column b type numeric using b::numeric;
>>> alter table at_partitioned alter column b type numeric using b::numeric;
>>> drop table at_partitioned cascade;
>>>
>> It seems to be the same bug as described in bug #15672
>> (https://www.postgresql.org/message-id/15672-b9fa7db32698269f@postgresql.org).
>> I'm Cc-ing Amit just in case.

Thanks Julien.

To summarize, the problem is that partition/child indexes, when recreated
due to ALTER COLUMN, all get the same relfilenode, which amounts to a
corrupted catalog state.

> Yes, after applying the patch presented in that thread the crash is not
> reproduced.
> Thanks for the tip!

Unfortunately, the patch I posted there is still very sketchy.  I will try
to revise it this week and will be waiting for comments.

Thanks,
Amit



pgsql-bugs by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: BUG #15684: Server crash on DROP partitioned table
Next
From: Amit Langote
Date:
Subject: Re: BUG #15677: Crash while deleting from partitioned table