pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: francescoboccacci@libero.it <francescoboccacci@libero.it>
To: pgsql-admin@postgresql.org
Subject: Re: Too many IDLE in current_query
Date: Tue, 12 Jul 2011 11:04:44 -0500
Message-ID: <4E1C2A4C020000250003F23C@gw.wicourts.gov> (raw)
In-Reply-To: <11819940.1364211310485136585.JavaMail.defaultUser@defaultHost>
References: <11819940.1364211310485136585.JavaMail.defaultUser@defaultHost>

"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



view thread (3+ messages)  latest in thread

Message-ID: <4E1C2A4C020000250003F23C@gw.wicourts.gov>
Permalink:  ../4E1C2A4C020000250003F23C@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4E1C2A4C020000250003F23C@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, francescoboccacci@libero.it
  Subject: Re: Too many IDLE in current_query
  In-Reply-To: <4E1C2A4C020000250003F23C@gw.wicourts.gov>
  References: <11819940.1364211310485136585.JavaMail.defaultUser@defaultHost> <4E1C2A4C020000250003F23C@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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