On Wed, 2010-08-04 at 14:40 -0400, Vick Khera wrote: > On Wed, Aug 4, 2010 at 10:50 AM, Gauthier, Dave <dave.gauthier@xxxxxxxxx> wrote: > > > > How does PG determine if a process is <IDLE> ? It there some sort of timeout? I want to be able to distinguish between somene who's interrupted on the phone for a couple minutes vs the guy who left the program running over the weekend. > > It is <IDLE> if it is not currently running a query. There are two things here. 1. <IDLE> I wouldn't touch these. It just means a query is not currently running and will not cause any problems. Further it could cause problems if you start terminating those backends because it could be an ETL process or some other long running app that executes a query, takes the results and starts to process them (which will cause <IDLE>) and then comes back to do other stuff. 2. <IDLE> In Transaction This is badness if it lasts for any length of time as it can conflict with routine maintenance. However again, it could also be doing the same thing as above. Sincerely, Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general