Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAH7i-00037X-0i for pgsql-bugs@arkaria.postgresql.org; Mon, 15 May 2017 14:37:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dAH7h-0001zd-K1 for pgsql-bugs@arkaria.postgresql.org; Mon, 15 May 2017 14:37:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dAH7g-0001yl-QG for pgsql-bugs@postgresql.org; Mon, 15 May 2017 14:37:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dAH7e-00073I-DK for pgsql-bugs@postgresql.org; Mon, 15 May 2017 14:37:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4FEbC7G010244; Mon, 15 May 2017 10:37:12 -0400 From: Tom Lane To: Michael Paquier cc: David Rowley , Marko Elezovic , "pgsql-bugs@postgresql.org" Subject: Re: Commenting a FK crashes ALTER TABLE statements In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Mon, 15 May 2017 13:19:57 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10242.1494859032.1@sss.pgh.pa.us> Date: Mon, 15 May 2017 10:37:12 -0400 Message-ID: <10243.1494859032@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Paquier writes: > On Mon, May 15, 2017 at 1:05 PM, David Rowley > 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. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs