TCP keepalive support for libpq

From: Tollef Fog Heen <tollef(dot)fog(dot)heen(at)collabora(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: TCP keepalive support for libpq
Date: 2010-02-09 13:03:28
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

(please Cc me on replies, I am not subscribed)


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 Content-Type Size
libpq_keepalive.diff text/x-diff 780 bytes


Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-02-09 13:45:01 Re: TCP keepalive support for libpq
Previous Message Yeb Havinga 2010-02-09 12:59:15 Re: Avoiding bad prepared-statement plans.