pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-general@postgresql.org
Subject: Re: circular wait not triggering deadlock ?
Date: Thu, 08 Mar 2018 13:57:06 -0500
Message-ID: <21765.1520535426@sss.pgh.pa.us> (raw)
In-Reply-To: <20180308182629.GJ24441@telsasoft.com>
References: <20180308182629.GJ24441@telsasoft.com>

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




view thread (5+ messages)  latest in thread

Message-ID: <21765.1520535426@sss.pgh.pa.us>
Permalink:  ../21765.1520535426@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21765.1520535426@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pryzby@telsasoft.com
  Subject: Re: circular wait not triggering deadlock ?
  In-Reply-To: <21765.1520535426@sss.pgh.pa.us>
  References: <20180308182629.GJ24441@telsasoft.com> <21765.1520535426@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox