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

From Fujii Masao
Subject Re: BUG #2576: tcp_keepalive doesn't work
Date
Msg-id 44E96053.10200@oss.ntt.co.jp
Whole thread Raw
In response to Re: BUG #2576: tcp_keepalive doesn't work  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #2576: tcp_keepalive doesn't work  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane wrote:
> According to that, Linux keepalive starts working once you have either
> sent or received at least one byte over the connection.  Therefore it's
> not possible to get past the authentication stage without keepalive
> being ready to go.  And we do have a pretty short timeout on the auth
> stage (1 minute if memory serves).

Do you mean authentication_timeout?
It's useless in my example because 'idle in transaction' backends
have already gotten past the auth stage.

> So I'm not seeing what problem we
> need to solve.

Please consider the system that puts the load from
two AP servers to one DB server.
At this time, the problem is that the processing of overall DB server might stop
when the LAN cable of only one AP server comes off.
Because 'idle in transaction' backends that don't terminate by tcp_keepalive
keep holding the lock.

>
> In any case, if you don't like that behavior methinks you need to be
> lobbying some kernel hackers, not database weenies.  Postgres is not
> in the business of second-guessing the TCP stack.

ok.
I also think that solving at the Kernel level is the best in this problem.


best regards;

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #2579: initcap should not capitalize letter
Next
From: Tom Lane
Date:
Subject: Re: BUG #2576: tcp_keepalive doesn't work