Comment 5 for bug 713216

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: MRP Locks down server

Kyle, one way to analyze this further would be if you could run the following query directly in a psql client at the time the problem occurs, and give us the output. This will display all running queries and the locks they hold:

-- Diagnose locks
select
       pg_stat_activity.datname,
       pg_class.relname,
       pg_locks.transactionid,
       pg_locks.virtualxid,
       pg_locks.virtualtransaction,
       pg_locks.mode,
       pg_locks.granted,
       pg_stat_activity.usename,
       pg_stat_activity.current_query,
       pg_stat_activity.query_start,
       pg_stat_activity.procpid
  from pg_stat_activity,
       pg_locks left outer join pg_class
         on (pg_locks.relation = pg_class.oid)
  where pg_locks.pid=pg_stat_activity.procpid
       and procpid != pg_backend_pid()
  order by procpid, query_start;

You can attach the output as a text file or put it on http://pastebin.com/ or similar, in order to avoid issues with comment wrapping.

Thanks!