Re: determine database and tables from deadlock

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Machiel Richards <machielr(at)rdc(dot)co(dot)za>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: determine database and tables from deadlock
Date: 2011-05-30 23:17:37
Message-ID: 4DE42591.7070702@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/30/2011 03:45 PM, Machiel Richards wrote:

> I am however not sure how to trace these back to a database, table, and
> maybe even a query to determine where things are going wrong.

One of the deadlocking queries is shown in the deadlock error message,
but one isn't really enough.

IIRC, newer versions of PostgreSQL print both queries.

You can use log_prefix to show the database, though I'm not sure it's in
8.1 .

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tarlika Elisabeth Schmitz 2011-05-30 23:20:26 Re: trigger - dynamic WHERE clause
Previous Message David Johnston 2011-05-30 21:09:45 Function Column Expansion Causes Inserts To Fail