Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.
Дата
Msg-id AANLkTikxJGwj-b90-gH3hGJDOMR-3DYVX2rjRdMy-cMd@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On Thu, Jun 24, 2010 at 1:40 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On Thu, 2010-06-24 at 10:30 -0400, Robert Haas wrote:
>
>> It lets you set
>> the TCP keepalive parameters on the server side, whereas what this
>> patch does is let you set them on the client side.  Only setting them
>> on the client side will allow the client to notice when the server has
>> gone away.
>
> Thank you for explaining. Now I understand.
>
> It sort of begs the question: why need they be different?

In most cases, they probably don't; in fact, I suspect most people
don't bother adjusting these parameters at all.  Essentially, they
just control the amount of time that can pass before you decide that
the other guy is dead.  And if the client thinks it's right to declare
the server dead after X minutes, it's probably reasonable for the
server to declare the client dead after X minutes, too.  On the other
hand, the client and server may be under different administrative
control.  What the DBA wants the database to do to avoid running out
of connection slots might not be the same as what the application
writer wants to do to detect when the database has crashed.  For that
exact reason, it's actually slightly strange that we make these
parameters PGC_USERSET on the server side - but not strange enough
that I can get excited about changing it.  If an application writer
wants to make trouble for the DBA, he certainly has better ways to do
it than this...

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: EOL for 7.4 and 8.0