Skip site navigation (1) Skip section navigation (2)

Re: lock help

From: Ray Stell <stellr(at)cns(dot)vt(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: lock help
Date: 2008-03-20 16:07:12
Message-ID: 20080320160712.GA8666@cns.vt.edu (view raw or flat)
Thread:
Lists: pgsql-admin
On Thu, Mar 20, 2008 at 10:42:29AM -0400, Tom Lane wrote:
> Ray Stell <stellr(at)cns(dot)vt(dot)edu> 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.

In response to

pgsql-admin by date

Next:From: Alvaro HerreraDate: 2008-03-20 16:51:11
Subject: Re: Reading information from crashed PGDATA
Previous:From: veejarDate: 2008-03-20 16:02:55
Subject: Reading information from crashed PGDATA

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group