Thread: Deadlock removal

Deadlock removal

From
"Albrecht Stephen (LWE)"
Date:
Hi,
I have somehow managed to lock a row in one of my database tables, and I am now unable to unlock that row.

I have tried using the ROLLBACK command, but get a notice: NO TRANSACTION IN PROGRESS. However, when I try to update or
deletethe record, the query never executes, and I have to cancel it manually, at which point I get the error: QUERY
CANCELREQUESTED WHILE WAITING LOCK. 

Anybody know how I can simply get rid of this lock?

Thanks,
Stephen.

Re: Deadlock removal

From
Peter Eisentraut
Date:
Albrecht Stephen (LWE) wrote:
> Anybody know how I can simply get rid of this lock?

A lock can only be held by a running transaction.  Therefore, to release
the lock for sure, terminate all other running transactions.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/