Re: Timeout and wait-forever in sync rep

Поиск
Список
Период
Сортировка
Искать
От
Greg Stark
Тема
Re: Timeout and wait-forever in sync rep
Дата
Msg-id
AANLkTim87K06KgPBcjDp6JyKXQNOvndwubCPqARS8Yhw@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Timeout and wait-forever in sync rep Fujii Masao <masao.fujii@gmail.com>
Re: Timeout and wait-forever in sync rep Simon Riggs <simon@2ndQuadrant.com>
Re: Timeout and wait-forever in sync rep Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>
Re: Timeout and wait-forever in sync rep Simon Riggs <simon@2ndQuadrant.com>
Re: Timeout and wait-forever in sync rep Fujii Masao <masao.fujii@gmail.com>
Re: Timeout and wait-forever in sync rep Greg Stark <gsstark@mit.edu>
Re: Timeout and wait-forever in sync rep Fujii Masao <masao.fujii@gmail.com>
Re: Timeout and wait-forever in sync rep Greg Stark <gsstark@mit.edu>
Re: Timeout and wait-forever in sync rep Bruce Momjian <bruce@momjian.us>
Re: Timeout and wait-forever in sync rep Fujii Masao <masao.fujii@gmail.com>
Re: Timeout and wait-forever in sync rep Robert Haas <robertmhaas@gmail.com>
Re: Timeout and wait-forever in sync rep Fujii Masao <masao.fujii@gmail.com>
Re: Timeout and wait-forever in sync rep Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
On Mon, Oct 18, 2010 at 10:24 PM, Fujii Masao  wrote:
> I mean, for example, that the server cannot detect the disconnection for
> more than 60 seconds even if the user configures the keepalive as follows.
>
>    tcp_keepalives_idle      = 10
>    tcp_keepalives_interval  = 5
>    tcp_keepalives_count     = 2

Yeah, TCP is not going to detect a broken connection that quickly.

I think there's a fundamental impedence mismatch of between the
application needs here and the design goals of TCP.

TCP is designed to work if at all possible and only generate an error
if it's unavoidable. Keepalives were controversial when they were
proposed but for the original purpose -- ensuring that long-lived
servers didn't leak connections indefinitely -- they serve they work.
The point of them was to cover the remaining cases where there was no
data in flight and therefore no way to ever detect that the connection
was dead.

TCP is only going to detect a connection as dead if it has exceeded
all the engineering limits of the network. Until then it's still
possible it'll come back and having the network layer generate an
error when it's possible the connection is still functioning would be
bad.



-- 
greg

В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата:
От: David Fetter
Дата:
FAQ