pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: andre <andre@google.com>
To: pgsql-admin@postgresql.org
To: pgsql-general@postgresql.org
Subject: How to detect Postgres deadlocks?
Date: Wed, 23 Aug 2006 12:45:56 -0700
Message-ID: <6c3954020608231245l3035ffbby41cfdbfac2d37326@mail.google.com> (raw)

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

view thread (3+ messages)  latest in thread

Message-ID: <6c3954020608231245l3035ffbby41cfdbfac2d37326@mail.google.com>
Permalink:  ../6c3954020608231245l3035ffbby41cfdbfac2d37326@mail.google.com/
Also on:    postgresql.org/message-id/6c3954020608231245l3035ffbby41cfdbfac2d37326@mail.google.com

 · 

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-admin@postgresql.org
  Cc: andre@google.com, pgsql-general@postgresql.org
  Subject: Re: How to detect Postgres deadlocks?
  In-Reply-To: <6c3954020608231245l3035ffbby41cfdbfac2d37326@mail.google.com>
  References: <6c3954020608231245l3035ffbby41cfdbfac2d37326@mail.google.com>

* 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