Lock won't release

Started by Matt Friedmanabout 25 years ago2 messagesgeneral
Jump to latest
#1Matt Friedman
matt@daart.ca

I have a lock on a table that won't release. I know this seems very unusual
but there appears to be a severe deadlock and pgsql has not release the
lock.

I've tried everything including recreating the db and trying to delete the
old one. psql wouldn't even let me delete the old db. It says that other
users are using the database. I'm assuming it's saying this because there's
a lock on the table.

Thanks for any help.

Matt Friedman
Spry New Media
http://www.sprynewmedia.com
Lead Programmer/Partner
email: matt@sprynewmedia.com
phone: 250 744 3655
fax: 250 370 0436

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Matt Friedman (#1)
Re: Lock won't release

"Matt Friedman" <matt@daart.ca> writes:

I have a lock on a table that won't release. I know this seems very unusual
but there appears to be a severe deadlock and pgsql has not release the
lock.

I've tried everything including recreating the db and trying to delete the
old one. psql wouldn't even let me delete the old db. It says that other
users are using the database. I'm assuming it's saying this because there's
a lock on the table.

Instead of an interpretation of what's happening, could we see the exact
commands you are issuing and the exact error messages you get?

Also, what other backends are connected to that DB, and what are they doing?

If there is a dangling lock someplace, restarting the postmaster ought
to get rid of it, but that will destroy all the evidence --- so I'd
recommend not doing that until we understand what's happening.

regards, tom lane