TCP keepalive support for libpq - Mailing list pgsql-hackers

From Tollef Fog Heen
Subject TCP keepalive support for libpq
Date
Msg-id 87d40ea7dr.fsf@qurzaw.linpro.no
Whole thread Raw
Responses Re: TCP keepalive support for libpq
Re: TCP keepalive support for libpq
List pgsql-hackers
(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.

--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

Attachment

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: buildfarm breakage
Next
From: Magnus Hagander
Date:
Subject: Re: TCP keepalive support for libpq