Re: Segfault on exclusion constraint violation - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: Segfault on exclusion constraint violation
Date
Msg-id 54CF9146.2040902@vmware.com
Whole thread Raw
In response to Re: Segfault on exclusion constraint violation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Segfault on exclusion constraint violation  (Dennis Pozzi <dpozzi@adobe.com>)
List pgsql-bugs
On 02/02/2015 04:38 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnakangas@vmware.com> 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Segfault on exclusion constraint violation
Next
From: Tom Lane
Date:
Subject: Re: BUG #12725: psql: no interpretation of option -F