Comment 15 for bug 322887

Revision history for this message
James Henstridge (jamesh) wrote :

To debug this, you could try issuing the following query when things are deadlocked:

    select datname, usename, xact_start, waiting, current_query from pg_stat_activity;

This should tell you what is going on from PostgreSQL's point of view. The deadlocked connections should show up with "waiting" set to true. If you have any "<IDLE> in transaction" connections, they are possible causes of the deadlock.