From: Tom Lane <tgl@sss.pgh.pa.us>
To: Олег Самойлов <splarv@ya.ru>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: tcp keep alive don't work when the backend is busy
Date: Tue, 10 Dec 2019 10:06:27 -0500
Message-ID: <4781.1575990387@sss.pgh.pa.us> (raw)
In-Reply-To: <3F592B64-264F-4E95-B555-7E7C9E8F57B8@ya.ru>
References: <3F592B64-264F-4E95-B555-7E7C9E8F57B8@ya.ru>
=?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= <splarv@ya.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, splarv@ya.ru
Subject: Re: tcp keep alive don't work when the backend is busy
In-Reply-To: <4781.1575990387@sss.pgh.pa.us>
References: <3F592B64-264F-4E95-B555-7E7C9E8F57B8@ya.ru> <4781.1575990387@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox