Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop

Todd A. Cook <tcook@blackducksoftware.com>

From: "Todd A. Cook" <tcook@blackducksoftware.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Thomas Munro <thomas.munro@enterprisedb.com>, PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Date: 2018-01-29T18:56:37Z
Lists: pgsql-bugs
On 01/29/18 13:31, Andres Freund wrote:
> On 2018-01-29 13:20:25 -0500, Todd A. Cook wrote:
>> I applied 0001 and 0002 to REL_10_STABLE at 1b2a3860d3ea81825e9bbad2c7dbf66db87445c1
>> and got the following build error:
>>
>> 	execGrouping.c:26:29: fatal error: utils/hashutils.h: No such file or directory
>> 	 #include "utils/hashutils.h"
> 
> Yea, there's some minor differences from master to the 10 branch,
> needing to backport one commit beforehand. Attached are three patches
> applying to 10.

Thanks.

With those patches applied, I'm able to process a 175 million row data set
without any problems.  I'll try the 900 million row set next.

-- todd


Commits

  1. Improve bit perturbation in TupleHashTableHash.

  2. Prevent growth of simplehash tables when they're "too empty".

  3. Add stack-overflow guards in set-operation planning.