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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL (was Re: [HACKERS] Feature freeze date for 8.1)
Дата
Msg-id 3733.1117129654@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL (was Re: [HACKERS] Feature freeze date for 8.1)  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
Список pgsql-patches
Oliver Jowett <oliver@opencloud.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

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: O_DIRECT for WAL writes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL