Re: proposal: setKeepAlive

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Toru SHIMOGAKI" <shimogaki(dot)toru(at)oss(dot)ntt(dot)co(dot)jp>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: proposal: setKeepAlive
Date: 2008-02-08 17:25:03
Message-ID: 87abmb2weo.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"Toru SHIMOGAKI" <shimogaki(dot)toru(at)oss(dot)ntt(dot)co(dot)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!

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2008-02-08 17:43:19 Re: proposal: setKeepAlive
Previous Message Toru SHIMOGAKI 2008-02-08 14:25:48 proposal: setKeepAlive