Re: BUG #2576: tcp_keepalive doesn't work - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2576: tcp_keepalive doesn't work
Date
Msg-id 2407.1155648616@sss.pgh.pa.us
Whole thread Raw
In response to BUG #2576: tcp_keepalive doesn't work  ("Fujii Masao" <fujii.masao@oss.ntt.co.jp>)
Responses Re: BUG #2576: tcp_keepalive doesn't work  (Fujii Masao <fujii.masao@oss.ntt.co.jp>)
List pgsql-bugs
"Fujii Masao" <fujii.masao@oss.ntt.co.jp> writes:
> I found an error that tcp_keepalive doesn't work.

You seem to have a misunderstanding of what tcp_keepalive is for.  It
does not kill a backend that is in the midst of a query.  A backend will
terminate when it is waiting for a client command and it sees that the
connection has been lost --- which is what a TCP timeout will cause to
happen.  But your example backends are not waiting for client commands.

If you want backends to abort live queries before they finish, use
statement_timeout.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Fujii Masao"
Date:
Subject: BUG #2576: tcp_keepalive doesn't work
Next
From: "Luiz Henrique"
Date:
Subject: Re: referential integrity violation - key referenced from