Re: Clients disconnect but query still runs - Mailing list pgsql-general

From Greg Stark
Subject Re: Clients disconnect but query still runs
Date
Msg-id 407d949e0907300241u5c78ff0fg122ee3e0a2eeba80@mail.gmail.com
Whole thread Raw
In response to Clients disconnect but query still runs  (Robert James <srobertjames@gmail.com>)
Responses Re: Clients disconnect but query still runs
List pgsql-general
On Thu, Jul 30, 2009 at 10:27 AM, Csaba Nagy<nagy@ecircle-ag.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

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: PostgreSQL server listen on other port than 5432
Next
From: Csaba Nagy
Date:
Subject: Re: Clients disconnect but query still runs