> -----Original Message-----
> From: Tom Lane [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 03, 2005 9:31 AM
> To: Hannu Krosing
> Cc: Heikki Linnakangas; Neil Conway; Oliver Jowett;
> [EMAIL PROTECTED]; Peter Eisentraut; Alvaro Herrera;
> pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Feature freeze date for 8.1
> 
> [...]
> I am a tad worried about the possibility that if the client 
> does nothing for long enough, the TCP output buffer will fill
> causing the backend to block at send().  A permanently blocked
> backend is bad news from a performance point of view (it
> degrades the sinval protocol for everyone else).

So use MSG_DONTWAIT or O_NONBLOCK on the keepalive packets.
That won't stop the buffer from getting filled up, but if you
get an EAGAIN while sending a keepalive packet, you know the
client is either dead or really busy.

__
David B. Held
Software Engineer/Array Services Group
200 14th Ave. East,  Sartell, MN 56377
320.534.3637 320.253.7800 800.752.8129

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to