From: Adrian Engelbrecht <adrianengelbrecht@hotmail.com>
To: pgsql-admin@postgresql.org
Subject: How to associate locks with a Postgres object
Date: Fri, 01 Apr 2005 11:48:37 +1200
Message-ID: <BAY20-F263D3A5D747BE6A7B76355B1470@phx.gbl> (raw)
<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>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: adrianengelbrecht@hotmail.com
Subject: Re: How to associate locks with a Postgres object
In-Reply-To: <BAY20-F263D3A5D747BE6A7B76355B1470@phx.gbl>
References: <BAY20-F263D3A5D747BE6A7B76355B1470@phx.gbl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox