Skip site navigation (1) Skip section navigation (2)

Re: Clients disconnect but query still runs

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Jasen Betts <jasen(at)xnet(dot)co(dot)nz>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Clients disconnect but query still runs
Date: 2009-07-30 09:41:41
Message-ID: 407d949e0907300241u5c78ff0fg122ee3e0a2eeba80@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On Thu, Jul 30, 2009 at 10:27 AM, Csaba Nagy<nagy(at)ecircle-ag(dot)com> wrote:
>
> Sorry, I have to disagree here. If there's a spurious network error, you
> have usually bigger problems. I prefer to have the connection killed
> even if the network recovers

I know this is a popular feeling. But you're throwing away decades of
work in making TCP reliable. You would change feelings quickly if you
ever faced this scenario too. All it takes is some bad memory or a bad
wire and you would be turning a performance drain into random
connection drops.


> than risk an idle in transaction connection
> to live forever when the client/network crashes for any reason. In case
> of network failure the connection will probably be cleaned eventually,
> but it did happen to me that a client machine crashed in the middle of a
> transaction while not executing any SQL, and that connection stayed
> until I killed it manually.

Well it ought to have eventually died. Your patience may have ran out
before the keep-alive timeouts fired though.

-- 
greg
http://mit.edu/~gsstark/resume.pdf

In response to

Responses

pgsql-general by date

Next:From: MoeDate: 2009-07-30 09:49:42
Subject: Re: How do I run PG Tuning Wizard on Linux?
Previous:From: Csaba NagyDate: 2009-07-30 09:27:25
Subject: Re: Clients disconnect but query still runs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group