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

Re: waiting column in pg_stat_activity and function pg_stat_get_backend_waiting (8.1)

From: Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>
To: Carol Cheung <cacheung(at)consumercontact(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: waiting column in pg_stat_activity and function pg_stat_get_backend_waiting (8.1)
Date: 2010-03-11 17:33:28
Message-ID: 1268328808.4412.1639.camel@bnicholson-desktop (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, 2010-03-10 at 13:38 -0500, Carol Cheung wrote:
> In 8.2, pg_stat_activity has a column called waiting, which is achieved 
> through a function called pg_stat_get_backend_waiting.
> 
> However, in 8.1, this column does not exist in pg_stat_activity. Is it 
> possible to get this column / data in 8.1? I see from 
> http://www.postgresql.org/docs/8.1/static/monitoring-stats.html
> that such a function is not available.

You can look at pg_locks for ungranted locks.   You can join back to
pg_stat_activity on the pid.

-- 
Brad Nicholson  416-673-4106
Database Administrator, Afilias Canada Corp.



In response to

pgsql-novice by date

Next:From: A BDate: 2010-03-11 18:42:14
Subject: Step back to previous state (a.k.a. undo)
Previous:From: Carol CheungDate: 2010-03-10 18:38:18
Subject: waiting column in pg_stat_activity and function pg_stat_get_backend_waiting (8.1)

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