> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers-
> owner@postgresql.org] On Behalf Of Tom Lane
> Sent: Monday, May 02, 2005 1:17 PM
> To: andrew@supernews.com
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Feature freeze date for 8.1
>
> Andrew - Supernews <andrew+nonews@supernews.com> writes:
> > Then the client has to guarantee that it can stop whatever it was
doing
> > (which might have nothing to do with the database) every so often in
> > order to send a message; this isn't feasible for most clients.
>
> It's certainly infeasible for libpq, which has no portable way to
force
> the calling app to give it control.
>
> regards, tom lane
Why not just use SO_KEEPALIVE on the TCP socket? Then the TCP stack
handles sending the keepalive messages, and there is no requirement that
the client application give control to anything... It's all handled by
the TCP stack.