Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DA199632CBB for ; Fri, 30 Apr 2010 10:09:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 29562-07 for ; Fri, 30 Apr 2010 13:09:49 +0000 (UTC) X-Greylist: delayed 00:06:38.43925 by SQLgrey-1.7.6 Received: from smtpauth14.prod.mesa1.secureserver.net (smtpauth14.prod.mesa1.secureserver.net [64.202.165.39]) by mail.postgresql.org (Postfix) with SMTP id 97C1B632215 for ; Fri, 30 Apr 2010 10:09:49 -0300 (ADT) Received: (qmail 2097 invoked from network); 30 Apr 2010 13:03:08 -0000 Received: from unknown (72.134.19.27) by smtpauth14.prod.mesa1.secureserver.net (64.202.165.39) with ESMTP; 30 Apr 2010 13:03:08 -0000 From: Kamcheung Sham Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Runaway Locks Date: Fri, 30 Apr 2010 06:03:06 -0700 Message-Id: To: pgsql-admin@postgresql.org Mime-Version: 1.0 (Apple Message framework v1078) X-Mailer: Apple Mail (2.1078) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201005/31 X-Sequence-Number: 34504 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=3D# select locktype, mode, relname, virtualtransaction, pid from = pg_locks l join pg_class c on l.relation =3D c.oid; = =20 locktype | mode | relname | = virtualtransaction | pid =20 = ----------+------------------+----------------------------+---------------= -----+------=20 relation | AccessShareLock | pg_locks | 1/38 = | 1816=20 relation | RowShareLock | hibernate_sequences | -1/2091555 = | =20 relation | RowExclusiveLock | hibernate_sequences | -1/2091555 = | =20 relation | AccessShareLock | pg_class_oid_index | 1/38 = | 1816=20 relation | AccessShareLock | pg_class_relname_nsp_index | 1/38 = | 1816=20 relation | AccessShareLock | pg_class | 1/38 = | 1816 (6 rows)arc_dev=3D#=20 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=