Skip site navigation (1) Skip section navigation (2)

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
Message-ID: (view raw, whole thread or download thread mbox)
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: libpq_keepalive.diff
Description: text/x-diff (780 bytes)


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group