Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YIIVj-00088T-CF for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Feb 2015 15:01:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YIIVi-0004NU-Sl for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Feb 2015 15:01:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YIIVi-0004NA-82 for pgsql-bugs@postgresql.org; Mon, 02 Feb 2015 15:01:58 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YIIVc-0000x7-2y for pgsql-bugs@postgresql.org; Mon, 02 Feb 2015 15:01:55 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id C4728286D9; Mon, 2 Feb 2015 07:01:47 -0800 (PST) Received: from EX13-CAS-013.vmware.com (EX13-CAS-013.vmware.com [10.113.191.65]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id BCADCB0DA7; Mon, 2 Feb 2015 07:01:47 -0800 (PST) Received: from [192.168.1.90] (10.113.160.246) by EX13-MBX-024.vmware.com (10.113.191.44) with Microsoft SMTP Server (TLS) id 15.0.913.22; Mon, 2 Feb 2015 07:01:47 -0800 Message-ID: <54CF9146.2040902@vmware.com> Date: Mon, 2 Feb 2015 17:01:26 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Tom Lane CC: Pg Bugs Subject: Re: Segfault on exclusion constraint violation References: <54CF808C.5080207@vmware.com> <14736.1422887937@sss.pgh.pa.us> In-Reply-To: <14736.1422887937@sss.pgh.pa.us> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.113.160.246] X-ClientProxiedBy: EX13-CAS-013.vmware.com (10.113.191.65) To EX13-MBX-024.vmware.com (10.113.191.44) X-Pg-Spam-Score: -6.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 On 02/02/2015 04:38 PM, Tom Lane wrote: > 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. Ok, I'll wait until after the release. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs