pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kamcheung Sham <csham@computer.org>
To: pgsql-admin@postgresql.org
Subject: Runaway Locks
Date: Fri, 30 Apr 2010 06:03:06 -0700
Message-ID: <EABB6BA9-81D1-4C93-9195-20CB1719EEEE@computer.org> (raw)


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


view thread (2+ messages)  latest in thread

Message-ID: <EABB6BA9-81D1-4C93-9195-20CB1719EEEE@computer.org>
Permalink:  ../EABB6BA9-81D1-4C93-9195-20CB1719EEEE@computer.org/
Also on:    postgresql.org/message-id/EABB6BA9-81D1-4C93-9195-20CB1719EEEE@computer.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: csham@computer.org
  Subject: Re: Runaway Locks
  In-Reply-To: <EABB6BA9-81D1-4C93-9195-20CB1719EEEE@computer.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox