pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to determine database activity???
3+ messages / 3 participants
[nested] [flat]
* How to determine database activity???
@ 2005-10-30 09:49 Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
0 siblings, 2 replies; 3+ messages in thread
From: Joost Kraaijeveld @ 2005-10-30 09:49 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to determine database activity???
@ 2005-10-31 01:05 Peter Eisentraut <peter_e@gmx.net>
parent: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
1 sibling, 0 replies; 3+ messages in thread
From: Peter Eisentraut @ 2005-10-31 01:05 UTC (permalink / raw)
To: pgsql-admin; +Cc: Joost Kraaijeveld <J.Kraaijeveld@askesis.nl>
Joost Kraaijeveld wrote:
> 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?
strace or ltrace will give you an idea, but I think you will find that
the answer is usually "yes" and you just have to be patient. :)
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to determine database activity???
@ 2005-10-31 04:16 adey <adey11@gmail.com>
parent: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
1 sibling, 0 replies; 3+ messages in thread
From: adey @ 2005-10-31 04:16 UTC (permalink / raw)
To: Joost Kraaijeveld <J.Kraaijeveld@askesis.nl>; +Cc: 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.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
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-10-31 04:16 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-30 09:49 How to determine database activity??? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2005-10-31 01:05 ` Peter Eisentraut <peter_e@gmx.net>
2005-10-31 04:16 ` adey <adey11@gmail.com>
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