Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] How to get info about deadlocks?

From: Massimo Dal Zotto <dz(at)cs(dot)unitn(dot)it>
To: hackers(at)postgreSQL(dot)org (PostgreSQL Hackers)
Subject: Re: [HACKERS] How to get info about deadlocks?
Date: 1999-11-29 17:47:08
Message-ID: (view raw, whole thread or download thread mbox)
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?
> > 
> Massimo has some.  See the top of lock.c for pg_options flags to dump
> out locks.

Yes, there is a DumpAllLocks() which should dump the lock table in case of
deadlock, but I have never been able to find any useful information from it.
The code is non compiled by default unless you define DEADLOCK_DEBUG.

Massimo Dal Zotto

|  Massimo Dal Zotto               email: dz(at)cs(dot)unitn(dot)it               |
|  Via Marconi, 141                phone: ++39-0461534251              |
|  38057 Pergine Valsugana (TN)      www:  |
|  Italy                             pgp: finger dz(at)tango(dot)cs(dot)unitn(dot)it  |

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1999-11-29 19:08:41
Subject: Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions
Previous:From: Lamar OwenDate: 1999-11-29 16:59:59
Subject: Re: [HACKERS] perl-DBD-Pg (was Re: BOUNCE Non-member submission from[Joe Brenner <>] (fwd))

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group