Performance Analysis and Troubleshooting
From Opentaps Wiki
Revision as of 00:52, 24 January 2008 by LeonTorres (talk | contribs) (New page: This is a page to assist with performance analysis and troubleshooting. == Monitoring Deadlocks in PostgreSQL == You can monitor any database locks using the Entity SQL Processor in Web...)
This is a page to assist with performance analysis and troubleshooting.
Monitoring Deadlocks in PostgreSQL
You can monitor any database locks using the Entity SQL Processor in Webtools -> Entity SQL Processor with the following query,
select pg_class.relname, pg_locks.mode, pg_locks.relation, pg_locks.transaction, pg_locks.pid from pg_class, pg_locks where pg_class.relfilenode=pg_locks.relation order by pid
This will show what kinds of locks are active on what entities. If there is an exclusive lock on a table followed by a bunch of pids that are waiting for it, then you have a deadlock.