2009-09-28 14:13:35 UTC
To look for deadlocked process in Postgres:
It looks as though the deadlock processes now return to the normal 'idle in transaction' state after 30 minutes. If this doesn't happen you can use the following commands to manually kill the process:-
Log on to the appropriate machine and run this command:
grep deadlock /var/log/postgresql.log
(you may need to be root,)
NB: If the file is not there - do
grep deadlock /var/log/messages
The ouput shows the process id. You can check if this process still exists with
ps waux | grep <process-id>
The deadlock can be killed with:
sudo kill <process-id>