Re: BUG #15290: Stuck Parallel Index Scan query

From: Victor Yegorov <vyegorov(at)gmail(dot)com>
To: thomas(dot)munro(at)enterprisedb(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15290: Stuck Parallel Index Scan query
Date: 2018-07-23 07:57:55
Message-ID: CAGnEboh-xhhxoVvFE2hpkera4UZUgDcN2P+yncsZWiFWZ+88TQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

пн, 23 июл. 2018 г. в 7:31, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>:

> PID 2877 is the master process and has decided to abort and is waiting
> for the workers to exit:
>
> WaitLatch
> WaitForBackgroundWorkerShutdown
> WaitForParallelWorkersToExit
> DestroyParallelContext
> AtEOXact_Parallel
> AbortTransaction
> AbortCurrentTransaction
> PostgresMain
>
> PIDs 3416, 3417, 3418, 3419 meanwhile are waiting to seize the scan head:
>
> WaitEventSetWaitBlock
> ConditionVariableSleep
> _bt_parallel_seize
> _bt_readnextpage
>
> Presumably 2877 has it (?), but aborted (do you have an error message
> in the server log?), and the workers have somehow survived
> TerminateBackgroundWorker() (called by DestroyParallelContext()).
>

Query was stuck for 8 hours when we tried to terminate it. Makes me think,
that master process was
still waiting for bgworkers to finish, as test run finished in 11ms for me.
As I mentioned, we've got this case re-appear while I was preparing
the report (had to restart the DB second time). I think I might make it
happen again, if necessary.

There is not so much in the logs:
- a bunch of `FATAL: connection to client lost`, but from another (web)
user (couple errors per hour)
- `ERROR: canceling statement due to conflict with recovery`, happened
right when our problematic query started, same user
- errors related to shutdown/startup of the DB.

--
Victor Yegorov

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message suan tay 2018-07-23 08:04:08 Re: BUG #15283: Query Result equal 0 for partitioned table
Previous Message Andres Freund 2018-07-23 04:35:44 Re: BUG #15290: Stuck Parallel Index Scan query