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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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