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

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, "Todd A. Cook" <tcook@blackducksoftware.com>, Thomas Munro <thomas.munro@enterprisedb.com>, PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Date: 2018-01-29T17:06:31Z
Lists: pgsql-bugs
Hi,

On 2018-01-29 14:41:49 +0100, Tomas Vondra wrote:
> Do you think repeating the performance testing is necessary? Not sure
> when do you plan to push the changes, I may not have time for the tests
> until after FOSDEM.

Hm, it surely wouldn't hurt, but your previous result does give a lot of
confidence - there's not a lot of fundamental difference leaving one
more mitigation that should never reduce hashtable "quality" aside.  So
I think going ahead with pushing and then benchmarking if possible, is
reasonable?

Greetings,

Andres Freund


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.