On Fri, 2010-04-30 at 12:32 -0400, Tom Lane wrote:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> > Claudio Freire <claudio@livra.com> wrote:
> >> I know it doesn't look like a deadlock from where you're standing,
> >> but it does so from where I am.
>
> > It's possible that you're filtering out the information which would
> > be most useful to diagnosing the problem. Next time it happens,
> > please send the entire output from pg_locks and pg_stat_activity
> > (preferably as attachments to avoid wrapping issues), along with the
> > information listed under "Things you need to mention" on this page:
>
> An even better thing, if you can spare a few minutes for analysis
> next time it happens, is to attach to each backend process with gdb
> and get a stack trace. If there is a deadlock that would probably
> be enough information to understand what it is.
Interesting idea... I'll see if I have gdb (or can install it) on the
server.