Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: tcook@blackducksoftware.com, pgsql-bugs@postgresql.org
Date: 2017-11-27T19:17:25Z
Lists: pgsql-bugs
Hi, On 11/27/2017 07:57 PM, tcook@blackducksoftware.com wrote: > The following bug has been logged on the website: > > Bug reference: 14932 > Logged by: Todd Cook > Email address: tcook@blackducksoftware.com > PostgreSQL version: 10.1 > Operating system: CentOS Linux release 7.4.1708 (Core) > Description: > > It hangs on a table with 167834 rows, though it works fine with only 167833 > rows. When it hangs, CTRL-C does not interrupt it, and the backend has to > be killed to stop it. > Can you share the query and data, so that we can reproduce the issue? Based on the stack traces this smells like a bug in the simplehash, introduced in PostgreSQL 10. Perhaps somewhere in tuplehash_grow(), which gets triggered for 167834 rows (but not for 167833). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Improve bit perturbation in TupleHashTableHash.
- d18d4bca81f8 10.2 landed
- c068f87723ca 11.0 landed
-
Prevent growth of simplehash tables when they're "too empty".
- d1aac2998789 10.2 landed
- ab9f2c429d8f 11.0 landed
-
Add stack-overflow guards in set-operation planning.
- 1b2a3860d3ea 10.2 cited