Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eu1nK-0002an-3s for pgsql-general@arkaria.postgresql.org; Thu, 08 Mar 2018 20:05:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eu1nI-0006wm-PY for pgsql-general@arkaria.postgresql.org; Thu, 08 Mar 2018 20:05:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eu1nI-0006wc-HS for pgsql-general@lists.postgresql.org; Thu, 08 Mar 2018 20:05:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eu1nF-0007ga-VE for pgsql-general@postgresql.org; Thu, 08 Mar 2018 20:05:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w28K5aeH025505; Thu, 8 Mar 2018 15:05:36 -0500 From: Tom Lane To: Justin Pryzby cc: pgsql-general@postgresql.org Subject: Re: circular wait not triggering deadlock ? In-reply-to: <20180308194559.GK24441@telsasoft.com> References: <20180308182629.GJ24441@telsasoft.com> <21765.1520535426@sss.pgh.pa.us> <20180308194559.GK24441@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Thu, 08 Mar 2018 13:45:59 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25503.1520539536.1@sss.pgh.pa.us> Date: Thu, 08 Mar 2018 15:05:36 -0500 Message-ID: <25504.1520539536@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Justin Pryzby writes: > On Thu, Mar 08, 2018 at 01:57:06PM -0500, Tom Lane wrote: >> PID 20488 is evidently waiting for PID 6471 to finish its transaction. >> What's that one doing? > Um, I thought I had kept track of all two pids but looks not.. > query | SELECT pg_export_snapshot(); pg_export_snapshot doesn't block for other transactions, though. Further down, you have output that confirms that: > 6471 | idle in transaction | psql | SELECT pg_export_snapshot(); That SELECT is the most recently completed command, not the current one. So now the question is what the connected application is waiting for before committing. regards, tom lane