Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Logging deadlocked statements? - Mailing list pgsql-general

From Mason Hale
Subject Logging deadlocked statements?
Date
Msg-id 8bca3aa10710161200l6ea99fb4m2d2bebf8a54f063@mail.gmail.com
Whole thread Raw
List pgsql-general
We're noticing a number of deadlock errors in our postgres logs.
Along with the errors, there is a single statement logged to give
context to the deadlock.

Is is possible to log all the statements involved in the deadlock?
We're having a hard time detecting these deadlocks when they happen,
and it would help if we knew what other statements were involved.

I know about looking at the pg_locks table, and will do that if we can
catch one of these happening in real time. But I'm most interested in
knowing if I can somehow log all statements involved in a deadlock
when they occur. Is that possible?

thanks in advance,
Mason

pgsql-general by date:

Previous
From: "Stanislav Raskin"
Date:
Subject: Re: Updating a production database schema from dev server
Next
From: jooy
Date:
Subject: need help with rebuilding postgresql