Hannu Krosing <[EMAIL PROTECTED]> writes:
>> What we can do in PostgreSQL is to introduce an application-level 
>> heartbeat. A simple "Hello world" message sent from server to client that 
>> the client would ignore would do the trick.

> Actually we would need a round-trip indicator (some there-and-back
> message: A: do you copy 42 --> B: yes I copy 42), and not just send.

No, a one-way message is sufficient.  The reason is that once we've
asked the TCP stack to send something, the customary timeouts before
declaring the connection dead are far shorter than they are for
keepalives.  Also see the point that we must not assume that the
client-side library can get control on short notice (or indeed any
notice).

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).

                        regards, tom lane

---------------------------(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