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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

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