Re: BUG #15684: Server crash on DROP partitioned table

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15684: Server crash on DROP partitioned table
Date: 2019-03-11 00:32:46
Message-ID: b5728427-39cf-255e-c544-97efc9410d3f@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2019-03-11 03:02:42 Re: BUG #15677: Crash while deleting from partitioned table
Previous Message Alexander Lakhin 2019-03-10 19:15:21 Re: BUG #15684: Server crash on DROP partitioned table