From: Kanwei Li <kanwei@gmail.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Frederico Costa Galvão <frederico.costa.galvao@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
Subject: Re: BUG #15489: Segfault on DELETE
Date: Thu, 8 Nov 2018 11:29:35 -0500
Message-ID: <36AB7969-AD14-4793-8C6E-21EDC293DE93@gmail.com> (raw)
In-Reply-To: <0ff5c33e-43b9-d3e2-9f74-572b694b0ac1@lab.ntt.co.jp>
References: <15489-f1158ddcc2584a8e@postgresql.org>
<26334113-2b97-db62-b72c-8066c2dedbb5@lab.ntt.co.jp>
<20181107071409.GA17169@paquier.xyz>
<a4873070-d39f-874d-8dfc-55ba4b6aaa09@gmail.com>
<0ff5c33e-43b9-d3e2-9f74-572b694b0ac1@lab.ntt.co.jp>
I did do a VACUUM FULL on that one particular table as well, so that may have been the command that fixed it, yes.
I have just upgraded to PG 11.1 and will report if I see this again. Thanks all!
Kanwei
> On Nov 7, 2018, at 8:33 PM, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>
> Thanks Frederico for your reply.
>
> On 2018/11/08 10:10, Frederico Costa Galvão wrote:
>> I stumbled upon this issue yesterday, and trying to reduce and pinpoint
>> it, I managed to get to this:
>>
>> //start
>> CREATE TABLE a (
>> id bigint
>> );
>>
>> INSERT INTO a (id) VALUES (1); -- this id's value doesn't matter
>>
>> ALTER TABLE ONLY a
>> ADD CONSTRAINT a_pkey PRIMARY KEY (id);
>>
>> CREATE TABLE b (
>> a_id bigint
>> );
>>
>> ALTER TABLE ONLY b
>> ADD CONSTRAINT b_a_id_fkey FOREIGN KEY (a_id) REFERENCES a(id);
>>
>> ALTER TABLE a ADD x BOOLEAN NOT NULL DEFAULT FALSE; -- or TRUE, doesn't
>> matter
>
> There it is. These are similar steps as I'd used to track down a bug
> that's now fixed in 11.1.
>
> https://www.postgresql.org/message-id/9cb4aa1c-12ba-59c3-fd75-545fa90fb92f%40lab.ntt.co.jp <https://www.postgresql.org/message-id/9cb4aa1c-12ba-59c3-fd75-545fa90fb92f%40lab.ntt.co.jp;
>
> The bug had to do with foreign key trigger not getting a proper
> representation of the tuple being deleted, considering the newly added column.
>
>> -- VACUUM FULL ANALYZE a; -- uncomment this to fix the bug
>
> Ah, VACUUM FULL will rewrite the tuples such that they're not hit by the
> aforementioned bug.
>
> So, if OP can tell that this is what happened in their case too, then 11.1
> will have fixed the issue.
>
> Thanks,
> Amit
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: kanwei@gmail.com, Langote_Amit_f8@lab.ntt.co.jp, frederico.costa.galvao@gmail.com, michael@paquier.xyz, noreply@postgresql.org
Subject: Re: BUG #15489: Segfault on DELETE
In-Reply-To: <36AB7969-AD14-4793-8C6E-21EDC293DE93@gmail.com>
References: <15489-f1158ddcc2584a8e@postgresql.org> <26334113-2b97-db62-b72c-8066c2dedbb5@lab.ntt.co.jp> <20181107071409.GA17169@paquier.xyz> <a4873070-d39f-874d-8dfc-55ba4b6aaa09@gmail.com> <0ff5c33e-43b9-d3e2-9f74-572b694b0ac1@lab.ntt.co.jp> <36AB7969-AD14-4793-8C6E-21EDC293DE93@gmail.com>
* 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