Re: psql hanging

From: "Trevor Talbot" <quension(at)gmail(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: "Steve Crawford" <scrawford(at)pinpointresearch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: psql hanging
Date: 2007-09-05 17:44:20
Message-ID: 90bce5730709051044p6112382co2e5533ee8341f38f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/5/07, Richard Huxton <dev(at)archonet(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message PSiegmann 2007-09-05 19:13:26 Is the ole db provider broken?
Previous Message Andrus 2007-09-05 17:21:39 Re: Reporting services for PostgreSQL