X-Original-To: pgsql-general-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 050F49FB346 for ; Wed, 23 Aug 2006 16:46:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 25601-07 for ; Wed, 23 Aug 2006 16:46:05 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id C1C5E9FB1F2 for ; Wed, 23 Aug 2006 16:46:05 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from smtp-out.google.com (smtp-out.google.com [216.239.45.12]) by svr4.postgresql.org (Postfix) with ESMTP id ECBA55AF5CE for ; Wed, 23 Aug 2006 19:46:04 +0000 (GMT) Received: from zps76.corp.google.com (zps76.corp.google.com [172.25.146.76]) by smtp-out.google.com with ESMTP id k7NJjwQO012041 for ; Wed, 23 Aug 2006 12:45:58 -0700 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:message-id:date:from:to:subject:mime-version:content-type; b=EQIf3kZoL+PA3SrW/LlSaDF/4+XfwTW+71kba0qOmn6jCAfLpQqPtj2Zra0L7PVgQ J6c0tP/oIHVcBLApbLlFQ== Received: from smtp-out2.google.com (fpe16.prod.google.com [10.253.5.16]) by zps76.corp.google.com with ESMTP id k7NIRREs012121 for ; Wed, 23 Aug 2006 12:45:56 -0700 Received: by smtp-out2.google.com with SMTP id 16so168076fpe for ; Wed, 23 Aug 2006 12:45:56 -0700 (PDT) Received: by 10.253.14.20 with SMTP id 20mr195250fpn; Wed, 23 Aug 2006 12:45:56 -0700 (PDT) Received: by 10.253.16.20 with HTTP; Wed, 23 Aug 2006 12:45:56 -0700 (PDT) Message-ID: <6c3954020608231245l3035ffbby41cfdbfac2d37326@mail.google.com> Date: Wed, 23 Aug 2006 12:45:56 -0700 From: andre To: pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: How to detect Postgres deadlocks? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21085_20989552.1156362356467" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.621 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_10_20, HTML_MESSAGE, SPF_NEUTRAL X-Spam-Level: ** X-Archive-Number: 200608/996 X-Sequence-Number: 99767 ------=_Part_21085_20989552.1156362356467 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, We are using Postgres 7.4.5, and I'm trying to find a way to detect and gather deadlock information. 1) Which sql queries should I use to detect deadlocks while they are happening? I see the deadlock info on the log file, but I'd like to query the database to see them as they happen... 2) Which fields on which pg catalogs indicate a deadlock condition? 3) How can I get more info about the processes involved on deadlocks? 4) How can I get the sql statements associated with the processes involved on deadlocks? On the logs I see the procpids of the processes involved on past deadlocks, but I 'd like to know how to get those procpids, and how to get the "current_query" associated with them... Thank you in advance, Andre Philippi ------=_Part_21085_20989552.1156362356467 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi,

We are using Postgres 7.4.5, and I'm trying to find a way to detect and gather deadlock information.

1) Which sql queries should I use to detect deadlocks while they are happening? I see the deadlock info on the log file, but I'd like to query the database to see them as they happen...

2) Which fields on which pg catalogs indicate a deadlock condition?

3) How can I get more info about the processes involved on deadlocks?

4) How can I get the sql statements associated with the processes involved on deadlocks?

On the logs I see the procpids of the processes involved on past deadlocks, but I 'd like to know how to get those procpids, and how to get the "current_query" associated with them...

Thank you in advance,

Andre Philippi

------=_Part_21085_20989552.1156362356467--