Re: BUG #14134: segmentation fault with large table with gist index

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Euler Taveira <euler(at)timbira(dot)com(dot)br>, Jihyun Yu <yjh0502(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14134: segmentation fault with large table with gist index
Date: 2016-06-05 18:51:40
Message-ID: CAM3SWZTNLkiXN8P93C_CG17uECnopA-9JuMrkJbe7LXeWR5SXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sun, Jun 5, 2016 at 8:54 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Pushed. I added an explicit initialization of orderbysort->abbreviate,
> because all the other callers of PrepareSortSupportFromOrderingOp make
> a point of setting that. Also a regression test.

Thanks.

It hardly matters, but this bug did not occur because interval is
pass-by-reference (I withdrew my previous remarks on typbyval-ness
being a factor here). As it happens, the built-in pass-by-value types
almost all have SortSupport for as long there has been a
sortsupport.h, but that's not automatically true. The shim code path
would still be taken and would still dereference a NULL memory context
pointer if there was an affected type. (A pass-by-value type with a
distance operator usable by GiST, but no SortSupport, used in the same
way as the test case shows.)

--
Peter Geoghegan

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomasz Ostrowski 2016-06-06 14:25:29 Routine analyze of single column prevents standard autoanalyze from running at all
Previous Message Tom Lane 2016-06-05 15:54:56 Re: BUG #14134: segmentation fault with large table with gist index