pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gary Stainburn <gary.stainburn@ringways.co.uk>
Cc: Egon Reetz <reetz@usco.de>
Cc: pgsql-admin@postgresql.org
Subject: Re: Fwd: Postgresql
Date: Mon, 03 Feb 2003 10:50:03 -0500
Message-ID: <19365.1044287403@sss.pgh.pa.us> (raw)
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>

Gary Stainburn <gary.stainburn@ringways.co.uk> 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



view thread (6+ messages)  latest in thread

Message-ID: <19365.1044287403@sss.pgh.pa.us>
Permalink:  ../19365.1044287403@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19365.1044287403@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gary.stainburn@ringways.co.uk, reetz@usco.de
  Subject: Re: Fwd: Postgresql
  In-Reply-To: <19365.1044287403@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox