X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A20A3475FB8 for ; Mon, 3 Feb 2003 10:54:48 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 6320D475AA1 for ; Mon, 3 Feb 2003 10:49:59 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h13Fo35u019366; Mon, 3 Feb 2003 10:50:04 -0500 (EST) To: Gary Stainburn Cc: Egon Reetz , pgsql-admin@postgresql.org Subject: Re: Fwd: Postgresql In-reply-to: <200302031528.09007.gary.stainburn@ringways.co.uk> References: <200302031351.04860.gary.stainburn@ringways.co.uk> <3E3E7F2F.7FDAC640@usco.de> <200302031528.09007.gary.stainburn@ringways.co.uk> Comments: In-reply-to Gary Stainburn message dated "Mon, 03 Feb 2003 15:28:09 +0000" Date: Mon, 03 Feb 2003 10:50:03 -0500 Message-ID: <19365.1044287403@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/44 X-Sequence-Number: 7242 Gary Stainburn writes: > How does Postgresql handle this? I would hope that it would notice the loss > of the IP connection and close the link gracefully, and not just leave the > connectino dangling. The backend runs the connection with TCP_KEEPALIVE set. The kernel should recognize the loss of connectivity after awhile ("awhile" means an hour or more if your kernel does this in an RFC-compliant fashion) and inform the backend, which will roll back any open transaction and then shut down. If connectivity was lost while active data transfer was going on, it will probably only take a few minutes for the kernel to declare connection loss. But if you were sitting idle, nothing will happen until the kernel issues a KEEPALIVE probe, which it shouldn't do very often. regards, tom lane