who has lock on table/row
who has lock on table/row
От:
"Mir S Islam" <mislam@mindspring.com>
Дата:
Is there a way to find out who(if any) has lock on a table ? 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. Thanks Mir
Re: who has lock on table/row
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Mir S Islam" 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