Re: proposal: setKeepAlive - Mailing list pgsql-jdbc

From Gregory Stark
Subject Re: proposal: setKeepAlive
Date
Msg-id 87abmb2weo.fsf@oxford.xeocode.com
Whole thread Raw
In response to proposal: setKeepAlive  (Toru SHIMOGAKI <shimogaki.toru@oss.ntt.co.jp>)
Responses Re: proposal: setKeepAlive  (Kris Jurka <books@ejurka.com>)
Re: proposal: setKeepAlive  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
"Toru SHIMOGAKI" <shimogaki.toru@oss.ntt.co.jp> writes:

> Hi,
>
> The attached makes tcp-keep-alive enable. When PostgreSQL server gets down or
> network gets down, client application can't receive any response from the server.

This has to be an option, not on unconditionally. In fact they shouldn't be on
automatically. Applications should have to explicitly request TCP keep-alives
and set an application-specific appropriate interval. Otherwise you're
breaking TCP in general for a behaviour which is only useful in particular
circumstances.

TCP is supposed to work even if the network disappears and then reappears
later, gracefully handling intermittent network failures. The case where you
want to close connections which doesn't respond quickly is when you have hosts
(usually clients, which makes it strange to want this in a database client
driver) which are frequently permanently unplugged or renumbered such as
dialup users. That's why it's important for ftp servers or web servers.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's 24x7 Postgres support!

pgsql-jdbc by date:

Previous
From: Toru SHIMOGAKI
Date:
Subject: proposal: setKeepAlive
Next
From: Kris Jurka
Date:
Subject: Re: proposal: setKeepAlive