Re: TCP keepalive support for libpq - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: TCP keepalive support for libpq
Date
Msg-id 9837222c1002090545o751b8d5aqebb7969c02292de8@mail.gmail.com
Whole thread Raw
In response to TCP keepalive support for libpq  (Tollef Fog Heen <tollef.fog.heen@collabora.co.uk>)
Responses Re: TCP keepalive support for libpq
List pgsql-hackers
On Tue, Feb 9, 2010 at 14:03, Tollef Fog Heen
<tollef.fog.heen@collabora.co.uk> wrote:
>
> (please Cc me on replies, I am not subscribed)
>
> Hi,
>
> libpq currently does not use TCP keepalives.  This is a problem in our
> case where we have some clients waiting for notifies and then the
> connection is dropped on the server side.  The client never gets the FIN
> and thinks the connection is up.  The attached patch unconditionally
> adds keepalives.  I chose unconditionally as this is what the server
> does.  We didn't need the ability to tune the timeouts, but that could
> be added with reasonable ease.

Seems reasonable to add this. Are there any scenarios where this can
cause trouble, that would be fixed by having the ability to select
non-standard behavior?
I don't recall ever changing away from the standard behavior in any of
my deployments, but that might be platform dependent?

If not, I think this is small and trivial enough not to have to push
back for 9.1 ;)

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Tollef Fog Heen
Date:
Subject: TCP keepalive support for libpq
Next
From: Jeroen Vermeulen
Date:
Subject: Re: Avoiding bad prepared-statement plans.