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

2019-12-11 Thread Олег Самойлов
> 10 дек. 2019 г., в 18:36, Justin написал(а): > > Hi Oner > > It appears that you looking for a way to detect and kill of idle connections > or process that are running for a long time Correct?? Nope, not idle. Only to stop an active connection if the client is already died.

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

2019-12-10 Thread Thomas Munro
On Wed, Dec 11, 2019 at 4:17 AM Fabio Ugo Venchiarutti wrote: > On 10/12/2019 15:06, Tom Lane wrote: > > =?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= writes: > >> According to the documentation > >> https://www.postgresql.org/docs/12/runtime-config-connection.html > >> A backend must check co

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

2019-12-10 Thread Justin
Hi Oner It appears that you looking for a way to detect and kill of idle connections or process that are running for a long time Correct?? If that is the case use statement_timeout setting and then use Pg_Agent and this script to kill off idle connections SELECT pg_terminate_backend(pid) FROM p

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

2019-12-10 Thread Fabio Ugo Venchiarutti
On 10/12/2019 15:06, Tom Lane wrote: =?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= 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_

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

2019-12-10 Thread Tom Lane
=?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= 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 wor