Re: who has lock on table/row

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mir S Islam" <mislam(at)mindspring(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: who has lock on table/row
Date: 2002-01-11 22:01:04
Message-ID: 1887.1010786464@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Mir S Islam" <mislam(at)mindspring(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-01-12 00:51:56 Re: How to union tables and have a field with UNIQUE constraint?
Previous Message Frank Bax 2002-01-11 21:13:13 Re: Resources