Re: BUG #14722: Segfault in tuplesort_heap_siftup, 32 bit overflow

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: skoposov@cmu.edu
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2017-06-29T16:34:40Z
Lists: pgsql-bugs
On Thu, Jun 29, 2017 at 9:16 AM,  <skoposov@cmu.edu> wrote:
> I have a very large table (40e9 records) that I'm trying to create the index
> on and I am getting a segmentation fault that could be traced as far as I
> understand to a 32 bit int overflow in tuplesort_heap_siftup

Can your print the Tuplesortstate (the variable "state") within GDB,
and post it here?


-- 
Peter Geoghegan


Commits

  1. Avoid integer overflow while sifting-up a heap in tuplesort.c.

  2. Implement binary heap replace-top operation in a smarter way.

  3. Permit super-MaxAllocSize allocations with MemoryContextAllocHuge().