Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1EEA42E4509 for ; Fri, 8 Feb 2008 13:25:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 22396-03-8 for ; Fri, 8 Feb 2008 13:25:15 -0400 (AST) Received: from oxford.xeocode.com (unknown [62.232.55.118]) by postgresql.org (Postfix) with ESMTP id DA7832E3E49 for ; Fri, 8 Feb 2008 13:25:14 -0400 (AST) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.69) (envelope-from ) id 1JNWyF-0002m7-LA; Fri, 08 Feb 2008 17:25:03 +0000 To: "Toru SHIMOGAKI" Cc: Subject: Re: proposal: setKeepAlive In-Reply-To: <47AC666C.9070704@oss.ntt.co.jp> (Toru SHIMOGAKI's message of "Fri\, 08 Feb 2008 23\:25\:48 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.jdbc" 1251) References: <47AC666C.9070704@oss.ntt.co.jp> From: Gregory Stark Organization: EnterpriseDB Date: Fri, 08 Feb 2008 17:25:03 +0000 Message-ID: <87abmb2weo.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/24 X-Sequence-Number: 18231 "Toru SHIMOGAKI" 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!