Re: BUG #14973: hung queries

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: skaurus(at)gmail(dot)com
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14973: hung queries
Date: 2017-12-18 17:38:09
Message-ID: CAEepm=0tc6X=5pR2koSk3i7qd7jdEnZ6VBD1BckVOr2ynUXGPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Dec 15, 2017 at 1:31 AM, <skaurus(at)gmail(dot)com> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14973
> Logged by: Dmitry Shalashov
> Email address: skaurus(at)gmail(dot)com
> PostgreSQL version: 10.1
> Operating system: Debian 9
> Description:
>
> We stumbled upon queries running for a day or more. They are simple ones, so
> that should not be happening. And most of the time it don't - very small
> share of these queries ends up like this.
>
> Moreover, these queries couldn't be stopped.
>
> pg_stat_activity says that they all have wait_event_type = IPC, wait_event =
> BtreePage, state = active
>
> strace tells that they all inside epoll_wait syscall
>
> grep over ps says that they all are "postgres: bgworker: parallel worker for
> PID ..."
>
> Looks like some bug in parallel seq scan maybe?
>
> We are going to disable parallel seq scan and restart our server in like 4
> hours from now. I can get more debug if asked before that.

Hello Dmitry,

Thank you for the report. It sounds like a known bug in 10.0 and 10.1
that was recently fixed:

https://www.postgresql.org/message-id/E1ePESn-0005PV-S9%40gemulon.postgresql.org

The problem is in Parallel Index Scan for btree. The fix will be in
10.2. One workaround in the meantime would be to disable parallelism
for that query (SET max_parallel_workers_per_gather = 0).

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2017-12-18 19:55:39 Re: BUG #14973: hung queries
Previous Message Peter Geoghegan 2017-12-18 17:37:40 Re: BUG #14940: Duplicated records inspite of primary key and unique constraint