Re: psql hanging - Mailing list pgsql-general

From Trevor Talbot
Subject Re: psql hanging
Date
Msg-id 90bce5730709051044p6112382co2e5533ee8341f38f@mail.gmail.com
Whole thread Raw
In response to Re: psql hanging  (Richard Huxton <dev@archonet.com>)
Responses Re: psql hanging  (Martijn van Oosterhout <kleptog@svana.org>)
Re: psql hanging  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general
On 9/5/07, Richard Huxton <dev@archonet.com> wrote:
> Steve Crawford wrote:

> > A while back I had to restart the server and today discovered that some
> > of the client machines have psql processes dating back several months.
> >
> > Obviously no TCP connection on the server end but client-side shows the
> > connection as "ESTABLISHED".
>
> The OS should clear that connection down after a timeout - hours
> perhaps, but months doesn't sound right. When the connection gets closed
> down psql should exit.

Unless psql is turning on keepalive or similar, or the OS is forcing
it on by default, there are no timeouts for idle TCP connections.  If
the command was transported to the server successfully and psql was
just waiting for a result, the connection is idle and nothing will
happen if the server end suddenly goes away.

pgsql-general by date:

Previous
From: Owen Hartnett
Date:
Subject: Re: problem with transactions in VB.NET using npgsql
Next
From: jesse.waters@gmail.com
Date:
Subject: Re: UTF8 frustrations