How to associate locks with a Postgres object

From: "Adrian Engelbrecht" <adrianengelbrecht(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: How to associate locks with a Postgres object
Date: 2005-03-31 23:48:37
Message-ID: BAY20-F263D3A5D747BE6A7B76355B1470@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

<html><div style='background-color:'><BR>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN class=EmailStyle20><FONT size=2><FONT face=Arial>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:-<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P>
<P><BR>select <BR>relation<BR>, transaction<BR>, pid<BR>, mode<BR>, granted<BR>, datname<BR>, procpid<BR>, u.usesysid <BR>, u.usename<BR>, usesuper<BR>--*<BR>from pg_locks l, pg_stat_activity s, pg_user u<BR>where l.pid = s.procpid and s.usesysid = u.usesysid<BR>order by l.pid;<BR></P>
<P>Help please?<BR></P>
<DIV>
<P>Adrian</P></DIV></div><br clear=all><hr>Become a fitness fanatic with <a href="http://g.msn.com/8HMAENNZ/2728??PS=47575" target="_top">XtraMSN Health & Fitness!</a> </html>

Attachment Content-Type Size
unknown_filename text/html 993 bytes

Browse pgsql-admin by date

  From Date Subject
Next Message Jamie Deppeler 2005-04-01 00:05:59 getGeneratedKeys()
Previous Message Jason DiCioccio 2005-03-31 23:41:31 Online Backups with 8.0 -- Confused