Re: [HACKERS] How to get info about deadlocks? - Mailing list pgsql-hackers

From Tim Holloway
Subject Re: [HACKERS] How to get info about deadlocks?
Date
Msg-id 38432C76.5D645DD2@southeast.net
Whole thread Raw
In response to How to get info about deadlocks?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Well, you have a bit table that indicates what locks are already held and
it's being AND'ed one indicating with the locks you hold. If they overlap,
you're in trouble.

Have you turned on LOCK_MGR_DEBUG? I'd print out the masks if the lock dump
routine doesn't already.

Tom Lane wrote:
> 
> 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
> 
> ************


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [DOCS] Re: [HACKERS] Outline for PostgreSQL book
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] indexable and locale