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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.
Date: 2010-06-24 17:56:56
Message-ID: AANLkTikxJGwj-b90-gH3hGJDOMR-3DYVX2rjRdMy-cMd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Jun 24, 2010 at 1:40 PM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2010-06-24 18:33:05 pgsql: Further 9.0 release notes updates.
Previous Message Simon Riggs 2010-06-24 17:40:06 Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2010-06-24 18:03:13 Re: EOL for 7.4 and 8.0
Previous Message Simon Riggs 2010-06-24 17:40:06 Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.