[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-admin
Subject: Re: [ADMIN] How to determine database activity???
From: adey <adey11 () gmail ! com>
Date: 2005-10-31 4:16:18
Message-ID: 1c66bda80510302016w1e64e9e7q4b734646b098da65 () mail ! gmail ! com
[Download RAW message or body]
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
>
[Attachment #3 (text/html)]
<div>Try this query that displays current activity:-</div>
<div> </div>
<div>select datid, <br> datname as "DB Name", \
<br> substr(procpid,1,6) as "Procpid", <br> substr(usesysid,1,5) \
AS "UseSysid", <br> usename, <br> current_query as SQL, \
<br> query_start<br>from <br> pg_stat_activity<br>order by \
<br> procpid</div> <div> </div>
<div>You may need to turn on some of the parameters in postgresql.conf to populate \
some of the returned columns in the table (view?).<br><br> </div> <div><span \
class="gmail_quote">On 10/30/05, <b class="gmail_sendername">Joost Kraaijeveld</b> \
<<a href="mailto:J.Kraaijeveld@askesis.nl">J.Kraaijeveld@askesis.nl</a>> \
wrote:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px \
0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>Is there a way to actually \
determine if the database is doing anything<br>after a query is send to the backend \
during *long* lasting queries <br>besides waiting and \
hoping?<br><br><br>--<br>Groeten,<br><br>Joost Kraaijeveld<br>Askesis \
B.V.<br>Molukkenstraat 14<br>6524NB Nijmegen<br>tel: 024-3888063 / \
06-51855277<br>fax: 024-3608416<br>e-mail: <a href="mailto:J.Kraaijeveld@Askesis.nl"> \
J.Kraaijeveld@Askesis.nl</a><br>web: <a \
href="http://www.askesis.nl">www.askesis.nl</a><br><br><br><br>---------------------------(end \
of broadcast)---------------------------<br>TIP 2: Don't 'kill -9' the \
postmaster<br></blockquote> </div><br>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic