Re: killing idle attaches without killing others

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Vick Khera <vivek(at)khera(dot)org>
Cc: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: killing idle attaches without killing others
Date: 2010-08-04 18:45:40
Message-ID: 1280947540.2025.56.camel@jd-desktop.unknown.charter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2010-08-04 at 14:40 -0400, Vick Khera wrote:
> On Wed, Aug 4, 2010 at 10:50 AM, Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2010-08-04 18:48:39 Re: Embedded text column versus referenced text
Previous Message Vick Khera 2010-08-04 18:40:28 Re: killing idle attaches without killing others