"francescobocca...@libero.it" <francescobocca...@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

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Reply via email to