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

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: tcook(at)blackducksoftware(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop
Date: 2017-11-27 19:17:25
Message-ID: fd924fd9-8f27-d945-04a9-57b503896107@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 11/27/2017 07:57 PM, tcook(at)blackducksoftware(dot)com wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14932
> Logged by: Todd Cook
> Email address: tcook(at)blackducksoftware(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Todd A. Cook 2017-11-27 20:59:37 Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop
Previous Message tcook 2017-11-27 18:57:00 BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop