Re: How to determine database activity???

From: adey <adey11(at)gmail(dot)com>
To: Joost Kraaijeveld <J(dot)Kraaijeveld(at)askesis(dot)nl>
Cc: Pgsql-Admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: How to determine database activity???
Date: 2005-10-31 04:16:18
Message-ID: 1c66bda80510302016w1e64e9e7q4b734646b098da65@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Try this query that displays current activity:-
select datid,
datname as "DB Name",
substr(procpid,1,6) as "Procpid",
substr(usesysid,1,5) AS "UseSysid",
usename,
current_query as SQL,
query_start
from
pg_stat_activity
order by
procpid
You may need to turn on some of the parameters in postgresql.conf to
populate some of the returned columns in the table (view?).

On 10/30/05, Joost Kraaijeveld <J(dot)Kraaijeveld(at)askesis(dot)nl> wrote:
>
> Hi,
>
> Is there a way to actually determine if the database is doing anything
> after a query is send to the backend during *long* lasting queries
> besides waiting and hoping?
>
>
> --
> Groeten,
>
> Joost Kraaijeveld
> Askesis B.V.
> Molukkenstraat 14
> 6524NB Nijmegen
> tel: 024-3888063 / 06-51855277
> fax: 024-3608416
> e-mail: J(dot)Kraaijeveld(at)Askesis(dot)nl
> web: www.askesis.nl <http://www.askesis.nl>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message MG 2005-10-31 07:59:42 Starten Server / SCO OpenServer6 / PostgreSQL 8.0.3
Previous Message Peter Eisentraut 2005-10-31 01:05:35 Re: How to determine database activity???