Re: who has lock on table/row - Mailing list pgsql-sql

From Tom Lane
Subject Re: who has lock on table/row
Date
Msg-id 1887.1010786464@sss.pgh.pa.us
Whole thread Raw
In response to who has lock on table/row  ("Mir S Islam" <mislam@mindspring.com>)
List pgsql-sql
"Mir S Islam" <mislam@mindspring.com> writes:
> Is there a way to find out who(if any) has lock on a table ?

Not at the moment.  We need a utility to dump out the contents of the
lock manager's data structures, but no one's got round to it.

> Basically I am
> trying to do an insert update transaction and it is waiting and waitin until
> I hit cancel. Since the application heavily uses transactions/commits I am
> assuming somewhere it is leaving something open because of which the
> following queries are not updating.

Try using "ps" to look for a backend that is sitting in "idle in
transaction" state.
        regards, tom lane


pgsql-sql by date:

Previous
From: Jochem van Dieten
Date:
Subject: Re: Error trying to create a functional index.
Next
From: Jochem van Dieten
Date:
Subject: Re: Error trying to create a functional index.