How to get info about deadlocks?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgreSQL.org
Date: 1999-11-29T04:31:49Z
Lists: pgsql-hackers
I've been experimenting with concurrent VACUUMs and getting occasional
instances of

NOTICE:  Deadlock detected -- See the lock(l) manual page for a possible cause.
ERROR:  WaitOnLock: error on wakeup - Aborting this transaction

It would be really nice if I could find out the particular locks that
are causing this conflict --- but the code that emits these messages
isn't very transparent :-(.  Can anyone explain how to determine just
what the deadlock is?

			regards, tom lane