Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 8BE162E00BA for ; Thu, 20 Mar 2008 13:08:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 57247-05-5 for ; Thu, 20 Mar 2008 13:07:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from locust.cns.vt.edu (locust.cns.vt.edu [198.82.169.14]) by postgresql.org (Postfix) with ESMTP id C1E212E0035 for ; Thu, 20 Mar 2008 13:07:35 -0300 (ADT) Received: by locust.cns.vt.edu (Postfix, from userid 986) id E3CF1118A60; Thu, 20 Mar 2008 12:07:12 -0400 (EDT) Date: Thu, 20 Mar 2008 12:07:12 -0400 From: Ray Stell To: Tom Lane Cc: pgsql-admin@postgresql.org Subject: Re: lock help Message-ID: <20080320160712.GA8666@cns.vt.edu> References: <20080320133637.GA6306@cns.vt.edu> <8832.1206024149@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8832.1206024149@sss.pgh.pa.us> User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/172 X-Sequence-Number: 28655 On Thu, Mar 20, 2008 at 10:42:29AM -0400, Tom Lane wrote: > Ray Stell writes: > Define "wedged" --- what's the actual problem? client queries not returning. > If it is a locking issue then the pg_locks view might be useful. duh, I meant to cut and paste the lock info and sent user info by being in a panic. ghiza=# select * from pg_locks; locktype | database | relation | page | tuple | transactionid | classid | objid | objsubid | transaction | pid | mode | granted ---------------+----------+----------+------+-------+---------------+---------+-------+----------+-------------+-------+-----------------+--------- relation | 16384 | 10328 | | | | | | | 15470960 | 30765 | AccessShareLock | t transactionid | | | | | 15470960 | | | | 15470960 | 30765 | ExclusiveLock | t (2 rows) As it turns out this app is distributed across 3 or 4 dbs and it was an oracle instance that was hung. However, I was ill prepared to eval the state of the pg db. Is there a good place to focus in the docs on how to evaluate locking issues. Thanks.