Re: circular wait not triggering deadlock ? - Mailing list pgsql-general

From Tom Lane
Subject Re: circular wait not triggering deadlock ?
Date
Msg-id 21765.1520535426@sss.pgh.pa.us
Whole thread Raw
In response to circular wait not triggering deadlock ?  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: circular wait not triggering deadlock ?  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-general
Justin Pryzby <pryzby@telsasoft.com> writes:
> Running pg10.2, I have a handful of maintenance jobs run in the middle of the
> night, which appear to have gotten stuck waiting on each other..

> ts=# SELECT granted, pid, mode, virtualtransaction, virtualxid FROM pg_locks WHERE virtualxid='22/4317099' ORDER BY
1,2,3;
>  granted |  pid  |     mode      | virtualtransaction | virtualxid
> ---------+-------+---------------+--------------------+------------
>  f       | 20488 | ShareLock     | 19/28401734        | 22/4317099
>  t       |  6471 | ExclusiveLock | 22/4317099         | 22/4317099

PID 20488 is evidently waiting for PID 6471 to finish its transaction.
What's that one doing?

> Is it a bug that this isn't caught by a deadlock detector and cancelled?

We did find a bug recently with concurrent CREATE INDEX CONCURRENTLY's
all waiting for each other to commit.

            regards, tom lane


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Troubleshooting a segfault and instance crash
Next
From: Kelly Burkhart
Date:
Subject: Re: Crash and core on 10.1 and 10.2