Re: BUG #14134: segmentation fault with large table with gist index - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: BUG #14134: segmentation fault with large table with gist index
Date
Msg-id CAM3SWZTrnui1h0yJW+idbSxQFpOU5yrHjrpr0D-aELs5==tM9A@mail.gmail.com
Whole thread Raw
In response to Re: BUG #14134: segmentation fault with large table with gist index  (Euler Taveira <euler@timbira.com.br>)
Responses Re: BUG #14134: segmentation fault with large table with gist index
Re: BUG #14134: segmentation fault with large table with gist index
List pgsql-bugs
On Wed, May 11, 2016 at 9:47 AM, Euler Taveira <euler@timbira.com.br> wrote:
> On 11-05-2016 12:49, yjh0502@gmail.com wrote:
>> The postgresql server crashed with segfault. Here's an index which causes
>> the crash:
>>
> It seems someone (5ea86e6e?) forgot to assign CurrentMemoryContext to
> ssup_ctx. I am not sure if it should be done at
> PrepareSortSupportFromOrderingOp or elsewhere.

That commit did not change anything about memory contexts, and did not
add new functionality to the SortSupport path taken here.

The bug is in commit 35fcb1b3, which failed to initialize ssup_ctx.
I'm surprised that it took this long for there to be trouble, because
that commit doesn't initialize anything at all in the sortsupport
object.

--
Peter Geoghegan

pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: BUG #14132: ON CONFLICT not inferring unique index with bigints
Next
From: Peter Geoghegan
Date:
Subject: Re: BUG #14134: segmentation fault with large table with gist index