Re: Commenting a FK crashes ALTER TABLE statements

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Marko Elezovic <marko(dot)elezovic(at)oradian(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Commenting a FK crashes ALTER TABLE statements
Date: 2017-05-16 01:07:20
Message-ID: CAB7nPqQW_V0mgMa7khcn6Sj8gEPjef-ruwFVGHVR9J=KTax_KA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, May 15, 2017 at 11:37 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
>> On Mon, May 15, 2017 at 1:05 PM, David Rowley
>> <david(dot)rowley(at)2ndquadrant(dot)com> wrote:
>>> It seems there's just some missing pstrdup() calls in
>>> RebuildConstraintComment().
>>>
>>> The attached should fix it.
>
>> I was just finishing to debug it :)
>> It is surprising that we have not caught this earlier as comment
>> re-creation handling in ALTER TABLE has been reworked some time ago
>> already. This means that we did not stress this code enough. Attached
>> is the previous fix, completed with a set of regression tests.
>
> Yeah, there should at least be a test case to cover the known crash.
>
> I'll take this one, unless some other committer is already on it.

Thanks. (committed as 12590c5d)
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2017-05-16 02:23:43 Re: BUG #14635: Query is executed slower on hot standby slave database then on master database
Previous Message postgresql 2017-05-15 16:51:23 BUG #14656: Request to add feature to Position function