"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