I have written the following query that ties together locks with databases and users, but I cannot determine from the columns in each of the views used how to associate this data with objects (tables, views, rows) in the Postgres database:-


select
relation
, transaction
, pid
, mode
, granted
, datname
, procpid
, u.usesysid
, u.usename
, usesuper
--*
from pg_locks l, pg_stat_activity s, pg_user u
where l.pid = s.procpid and s.usesysid = u.usesysid
order by l.pid;

Help please?

Adrian



Become a fitness fanatic with XtraMSN Health & Fitness!