Re: Tracking down a deadlock - Mailing list pgsql-general

From Tom Lane
Subject Re: Tracking down a deadlock
Date
Msg-id 15848.1241279301@sss.pgh.pa.us
Whole thread Raw
In response to Re: Tracking down a deadlock  (Bill Moseley <moseley@hank.org>)
Responses Re: Tracking down a deadlock  (Bill Moseley <moseley@hank.org>)
List pgsql-general
Bill Moseley <moseley@hank.org> writes:
> Not getting any nibbles, so allow me to try a short question:
> If I have a deadlock situation (that will be reported as such by
> Postgresql once the deadlock_timeout passes), does pg_stat_activity
> show the queries that are blocking each other?

In 8.2 or later it should do so; in prior versions there could be some
lag involved.  Another thing to keep in mind is that backends like to
cache copies of the pg_stat_activity view --- if you are watching it
to see what is happening, your view is only current as of the start
of your current transaction.  Or you can do pgstat_clear_snapshot()
to force collection of new info.

            regards, tom lane

pgsql-general by date:

Previous
From: Bill Moseley
Date:
Subject: Re: Tracking down a deadlock
Next
From: "Daniel Verite"
Date:
Subject: Re: Two Questions Re: Warm Backup