Runaway Locks

From: Kamcheung Sham <csham(at)computer(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: Runaway Locks
Date: 2010-04-30 13:03:06
Message-ID: EABB6BA9-81D1-4C93-9195-20CB1719EEEE@computer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


I was connecting to Postgres 8.3 through JDBC. During my unit tests, something when wrong and now leaving with the following locks in the db:

arc_dev=# select locktype, mode, relname, virtualtransaction, pid from pg_locks l join pg_class c on l.relation = c.oid;
locktype | mode | relname | virtualtransaction | pid
----------+------------------+----------------------------+--------------------+------
relation | AccessShareLock | pg_locks | 1/38 | 1816
relation | RowShareLock | hibernate_sequences | -1/2091555 |
relation | RowExclusiveLock | hibernate_sequences | -1/2091555 |
relation | AccessShareLock | pg_class_oid_index | 1/38 | 1816
relation | AccessShareLock | pg_class_relname_nsp_index | 1/38 | 1816
relation | AccessShareLock | pg_class | 1/38 | 1816
(6 rows)arc_dev=#

The locks on 'hibernate_sequences' is causing any update to the locked row to hang. There is currently no running database client process anymore (as I've restarted by server a few times).

My question is how do i kill the virtual transaction and have the locks released?

Thanks,
kam

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Péter Kovács 2010-04-30 13:30:57 How to query hostname of the server
Previous Message Gavin Kistner 2010-04-30 05:58:54 Re: Fresh build on OS X not working (memory)