Thread: BUG #6313: Deadlock reporting contains not enought details

BUG #6313: Deadlock reporting contains not enought details

From
dmigowski@ikoffice.de
Date:
The following bug has been logged on the website:

Bug reference:      6313
Logged by:          Daniel Migowski
Email address:      dmigowski@ikoffice.de
PostgreSQL version: 8.3.16
Operating system:   Linux
Description:=20=20=20=20=20=20=20=20

In my application I receive deadlocks from time to time, reported by an
error message like this:

ERROR: deadlock detected
SQL Status:40P01
Detail:Process 30812 waits for ShareLock on transaction 278158200; blocked
by process 2852.
Process 2852 waits for ShareLock on transaction 278158159; blocked by
process 30812.

This is absolutely useless for me for the following reasons. I know which
processes have participated in the deadlock, and one of them returns an
error, abd I know which statement does the deadlock, but my "statement=
"
contains of 20 single sql statements and I don't know which lock the
processes where fighting over. Could you please add information about which
lock could not be granted, and what other locks have already been in place
(or at least, what other locks have participated in this deadlock
detection)?

Re: BUG #6313: Deadlock reporting contains not enought details

From
Tom Lane
Date:
dmigowski@ikoffice.de writes:
> PostgreSQL version: 8.3.16

> In my application I receive deadlocks from time to time, reported by an
> error message like this:

> ERROR: deadlock detected
> SQL Status:40P01
> Detail:Process 30812 waits for ShareLock on transaction 278158200; blocked
> by process 2852.
> Process 2852 waits for ShareLock on transaction 278158159; blocked by
> process 30812.

> This is absolutely useless for me for the following reasons.

If you were running a more modern version of Postgres, you would find a
more complete report about the deadlock in the postmaster log.  We're
not going to change it in 8.3.x though.

            regards, tom lane