Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL (was Re: [HACKERS] Feature freeze date for 8.1)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL (was Re: [HACKERS] Feature freeze date for 8.1)
Date: 2005-05-26 17:47:34
Message-ID: 3733.1117129654@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> Here's a patch that adds four new GUCs:

> tcp_keepalives (defaults to on, controls SO_KEEPALIVE)
> tcp_keepalives_idle (controls TCP_KEEPIDLE)
> tcp_keepalives_interval (controls TCP_KEEPINTVL)
> tcp_keepalives_count (controls TCP_KEEPCNT)

Do you think the system defaults are really going to be port-specific?
I'm slightly annoyed by the number of syscalls this adds to every
connection startup ... getting rid of redundant getsockopt calls would
help. Getting rid of redundant setsockopt calls (ie, a call to
establish the value that we already know is in force) would help more.

Alternatively, we could lose the frammish that PostgreSQL can tell you
what the system defaults are: 0 in the GUC just means "do nothing",
not "find out what the current setting is on the off chance that the
user might want to know".

Or, if you really think that's important, it could be left to the SHOW
routines to extract the value on-demand. That is:
GUC = 0: do nothing at connection start
GUC != 0: setsockopt at connection start
SHOW: do getsockopt and report result

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-05-26 17:50:25 Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
Previous Message Jaime Casanova 2005-05-26 17:34:47 Re: adding a function to pg_proc.h

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-05-26 17:50:25 Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
Previous Message tandra cole 2005-05-26 17:35:35 News: Health Information