Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YII9X-0007DH-O2 for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Feb 2015 14:39:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YII9X-0004qG-6E for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Feb 2015 14:39:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YII9W-0004nz-4X for pgsql-bugs@postgresql.org; Mon, 02 Feb 2015 14:39:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YII9S-0000Ji-QK for pgsql-bugs@postgresql.org; Mon, 02 Feb 2015 14:39:00 +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 t12EcvsM014737; Mon, 2 Feb 2015 09:38:57 -0500 From: Tom Lane To: Heikki Linnakangas cc: Pg Bugs Subject: Re: Segfault on exclusion constraint violation In-reply-to: <54CF808C.5080207@vmware.com> References: <54CF808C.5080207@vmware.com> Comments: In-reply-to Heikki Linnakangas message dated "Mon, 02 Feb 2015 15:50:04 +0200" Date: Mon, 02 Feb 2015 09:38:57 -0500 Message-ID: <14736.1422887937@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 Heikki Linnakangas writes: > 9.4 and master segfaults, if an insertion would need to wait for another > transaction to finish because of an exclusion constraint. To reproduce: > ... > This only happens with assertions enabled. The culprit is commit > f88d4cfc9d417dac2ee41a8f5e593898e56fd2bd, which added the 'ctid' > argument to XactLockTableWait. check_exclusion_constraint calls > index_endscan() just before XactLockTableWait, but that free's the > memory the ctid points to. > I'll write up a patch to change those call sites to use local variables. > Hopefully it's trivial enough to still include in 9.4.1, although time > is really running out.. If the only known bad consequence requires assertions enabled, I think it would be more prudent to *not* try to fix this in haste. 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