pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedToo many IDLE in current_query
3+ messages / 3 participants
[nested] [flat]
* Too many IDLE in current_query
@ 2011-07-12 15:38 francescoboccacci@libero.it <francescoboccacci@libero.it>
2011-07-12 16:04 ` Re: Too many IDLE in current_query Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-07-12 16:35 ` Re: Too many IDLE in current_query Vibhor Kumar <vibhor.aim@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: francescoboccacci@libero.it @ 2011-07-12 15:38 UTC (permalink / raw)
To: pgsql-admin
Dear all,
i'm checking my postgresql server to try to monitoring all activity that are
running.
i run this query:
postgres=# select
current_timestamp - query_start as runtime,
current_query
from pg_stat_activity
order by 1 desc;
and the resul is many rows like this:
runtime | current_query
-------------------------+---------------------------------------------
34 days 06:53:59.959751 | <IDLE>
34 days 06:53:59.924254 | <IDLE>
34 days 06:53:56.870348 | <IDLE>
34 days 06:04:34.553884 | <IDLE>
34 days 06:04:24.975262 | <IDLE>
34 days 06:04:20.951703 | <IDLE>
34 days 06:04:11.200763 | <IDLE>
34 days 02:45:07.633385 | <IDLE>
20 days 06:21:00.519184 | <IDLE>
20 days 04:56:16.008164 | <IDLE>
20 days 04:35:46.465805 | <IDLE>
20 days 01:44:22.723898 | <IDLE>
19 days 07:32:29.484493 | <IDLE>
2 days 09:08:29.955712 | <IDLE>
2 days 09:08:29.929274 | <IDLE>
2 days 09:08:29.914055 | <IDLE>
2 days 09:08:29.910676 | <IDLE>
2 days 09:08:29.231103 | <IDLE>
2 days 09:08:29.22941 | <IDLE>
2 days 09:08:29.20836 | <IDLE>
2 days 09:08:29.203906 | <IDLE>
2 days 09:08:29.198813 | <IDLE>
2 days 09:08:29.19535 | <IDLE>
2 days 09:08:28.214741 | <IDLE>
2 days 09:08:28.210447 | <IDLE>
2 days 09:08:28.183688 | <IDLE>
2 days 09:08:28.179618 | <IDLE>
2 days 09:08:28.161658 | <IDLE>
2 days 09:08:28.151496 | <IDLE>
1 day 09:03:14.978079 | <IDLE>
1 day 09:03:12.246013 | <IDLE>
1 day 08:53:47.763229 | <IDLE>
1 day 08:53:46.744188 | <IDLE>
1 day 08:49:21.584343 | <IDLE>
1 day 07:44:18.245998 | <IDLE>
1 day 05:18:29.171981 | <IDLE>
1 day 03:25:18.260414 | <IDLE>
1 day 02:47:34.402538 | <IDLE>
1 day 02:47:33.816568 | <IDLE>
1 day 02:47:33.472902 | <IDLE>
1 day 00:59:58.531684 | <IDLE>
07:07:43.146363 | <IDLE>
06:52:19.014704 | <IDLE>
...
...
i know that this is just a snapshot of the situation of the server in a
particular moment, so i know that i can see all IDLE queries.
The strange thing is that there are quesries that are running from 34 days.I
think is strange.
Do you have any suggestions? My postgresql version is 8.4. I know that in
postgresql 9.0 i can see also application_name filed.
Thanks for your help
Francesco Boccacci
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Too many IDLE in current_query
2011-07-12 15:38 Too many IDLE in current_query francescoboccacci@libero.it <francescoboccacci@libero.it>
@ 2011-07-12 16:04 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Grittner @ 2011-07-12 16:04 UTC (permalink / raw)
To: francescoboccacci@libero.it <francescoboccacci@libero.it>; pgsql-admin
"francescoboccacci@libero.it" <francescoboccacci@libero.it> wrote:
> i'm checking my postgresql server to try to monitoring all
> activity that are running.
> i run this query:
>
> postgres=# select
> current_timestamp - query_start as runtime,
> current_query
> from pg_stat_activity
> order by 1 desc;
> The strange thing is that there are quesries that are running from
> 34 days.I think is strange.
query_start is the last time a query started; it doesn't indicate
that it's still running. In fact <IDLE> means it isn't. You should
probably exclude rows where xact_start is null or where
current_query = '<IDLE>'.
-Kevin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Too many IDLE in current_query
2011-07-12 15:38 Too many IDLE in current_query francescoboccacci@libero.it <francescoboccacci@libero.it>
@ 2011-07-12 16:35 ` Vibhor Kumar <vibhor.aim@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Vibhor Kumar @ 2011-07-12 16:35 UTC (permalink / raw)
To: francescoboccacci@libero.it <francescoboccacci@libero.it>; +Cc: pgsql-admin
On Jul 12, 2011, at 9:08 PM, francescoboccacci@libero.it wrote:
> i know that this is just a snapshot of the situation of the server in a
> particular moment, so i know that i can see all IDLE queries.
> The strange thing is that there are quesries that are running from 34 days.I
> think is strange.
<IDLE> mean connection is idle. It doesn't mean query is running.
> Do you have any suggestions? My postgresql version is 8.4. I know that in
> postgresql 9.0 i can see also application_name filed.
You can use pg_stat_Activity.client_addr and pg_stat_activity.client_port to find the informaiton of client machine.
Thanks & Regards,
Vibhor Kumar
vibhor.aim@gmail.com
Blogs: http://vibhork.blogspot.com
http://vibhorkumar.wordpress.com
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-07-12 16:35 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-07-12 15:38 Too many IDLE in current_query francescoboccacci@libero.it <francescoboccacci@libero.it>
2011-07-12 16:04 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-07-12 16:35 ` Vibhor Kumar <vibhor.aim@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