X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EFB7ADB48D for ; Mon, 31 Oct 2005 00:16:23 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 54587-06 for ; Mon, 31 Oct 2005 04:16:20 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.202]) by svr1.postgresql.org (Postfix) with ESMTP id A5CF4DB481 for ; Mon, 31 Oct 2005 00:16:20 -0400 (AST) Received: by zproxy.gmail.com with SMTP id l8so701917nzf for ; Sun, 30 Oct 2005 20:16:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=GhzNmEks1f8cYwBpVGMonMqOFwvW5uyD6h3VsZKl338ItnofzxhMThZ6sT751jldHTiS+rf9HY/C5qjFVFy2fgjqOWnjXKwBGtxWxmQf4xbJimdM/QeZUzct86sqUcMlWsymYvu0yl8hhl2fU5+LI+CCxcHt7rz0s5XvP1ufchM= Received: by 10.65.228.18 with SMTP id f18mr1229899qbr; Sun, 30 Oct 2005 20:16:18 -0800 (PST) Received: by 10.65.52.8 with HTTP; Sun, 30 Oct 2005 20:16:18 -0800 (PST) Message-ID: <1c66bda80510302016w1e64e9e7q4b734646b098da65@mail.gmail.com> Date: Mon, 31 Oct 2005 17:16:18 +1300 From: adey To: Joost Kraaijeveld Subject: Re: How to determine database activity??? Cc: Pgsql-Admin In-Reply-To: <1130665776.13853.82.camel@Panoramix> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1669_10839440.1130732178892" References: <1130665776.13853.82.camel@Panoramix> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.326 required=5 tests=[AWL=0.325, HTML_MESSAGE=0.001] X-Spam-Score: 0.326 X-Spam-Level: X-Archive-Number: 200510/289 X-Sequence-Number: 19361 ------=_Part_1669_10839440.1130732178892 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 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 > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > ------=_Part_1669_10839440.1130732178892 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Try this query that displays current activity:-
 
select  datid,
 datname as "DB Name",
&nbs= p;substr(procpid,1,6) as "Procpid",
 substr(usesysid,1,5= ) AS "UseSysid",
 usename,
 current_query as SQ= L,
 query_start
from=20
 pg_stat_activity
order by
 procpid
 
You may need to turn on some of the parameters in postgresql.conf to p= opulate some of the returned columns in the table (view?).

 
On 10/30/05, Joost Kraaijeveld <J.Kr= aaijeveld@askesis.nl> wrote:
Hi,

Is there a way to act= ually 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 Kraa= ijeveld
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



---------------------------(end of broadcast)= ---------------------------
TIP 2: Don't 'kill -9' the postmaster

------=_Part_1669_10839440.1130732178892--