Re: tcp keep alive don't work when the backend is busy

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Олег Самойлов <splarv(at)ya(dot)ru>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: tcp keep alive don't work when the backend is busy
Date: 2019-12-10 15:06:27
Message-ID: 4781.1575990387@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= <splarv(at)ya(dot)ru> writes:
> According to the documentation
> https://www.postgresql.org/docs/12/runtime-config-connection.html
> A backend must check connection to the client by tcp_keepalive messages. (Config option tcp_keepalives_idle).

> But this is don't work if the backend is busy.

You're reading something into the documentation that isn't there.

The TCP keepalive mechanism is something that the OS does, independently
of backend processing. The backend isn't going to notice loss of client
connection until it tries to read or write on the connection.

If it were free to improve this, we might do so. But it would be
very much not free.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fabio Ugo Venchiarutti 2019-12-10 15:17:32 Re: tcp keep alive don't work when the backend is busy
Previous Message stan 2019-12-10 13:36:35 Re: server will not start (Debian)