From: adey <adey11@gmail.com>
To: Joost Kraaijeveld <J.Kraaijeveld@askesis.nl>
Cc: Pgsql-Admin <pgsql-admin@postgresql.org>
Subject: Re: How to determine database activity???
Date: Mon, 31 Oct 2005 17:16:18 +1300
Message-ID: <1c66bda80510302016w1e64e9e7q4b734646b098da65@mail.gmail.com> (raw)
In-Reply-To: <1130665776.13853.82.camel@Panoramix>
References: <1130665776.13853.82.camel@Panoramix>
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.Kraaijeveld@askesis.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.Kraaijeveld@Askesis.nl
> web: www.askesis.nl <http://www.askesis.nl;
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: adey11@gmail.com, J.Kraaijeveld@askesis.nl
Subject: Re: How to determine database activity???
In-Reply-To: <1c66bda80510302016w1e64e9e7q4b734646b098da65@mail.gmail.com>
References: <1130665776.13853.82.camel@Panoramix> <1c66bda80510302016w1e64e9e7q4b734646b098da65@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox