RE: Timeout parameters

Поиск
Список
Период
Сортировка
От Tsunakawa, Takayuki
Тема RE: Timeout parameters
Дата
Msg-id 0A3221C70F24FB45833433255569204D1FBEC411@G01JPEXMBYT05
обсуждение исходный текст
Ответ на Re: Timeout parameters  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы RE: Timeout parameters
RE: Timeout parameters
Список pgsql-hackers
From: Kyotaro HORIGUCHI [mailto:horiguchi.kyotaro@lab.ntt.co.jp]
> +    if (setsockopt(conn->sock, IPPROTO_TCP, TCP_USER_TIMEOUT,
> +             (char *) &timeout, sizeof(timeout)) < 0 && errno !=
> ENOPROTOOPT)
> +    {
> +        char        sebuf[256];
> +
> +        appendPQExpBuffer(&conn->errorMessage,
> +                    libpq_gettext("setsockopt(TCP_USER_TIMEOUT)
> failed: %s\n"),
> 
> I suppose that the reason ENOPROTOOPT is excluded from error
> condition is that the system call may fail with that errno on
> older kernels, but I don't think that that justifies ignoring the
> failure.

I think that's for the case where the modules is built on an OS that supports TCP_USER_TIMEOUT (#ifdef TCP_USER_TIMEOUT
istrue), and the module is used on an older OS that doesn't support TCP_USER_TIMEOUT.  I remember I was sometimes able
todo such a thing on Linux and Solaris.  If we don't have to handle such usage, I agree about removing the special
handlingof ENOTPROTO.
 


Regards
Takayuki Tsunakawa







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

Предыдущее
От: Darafei "Komяpa" Praliaskouski
Дата:
Сообщение: Re: Berserk Autovacuum (let's save next Mandrill)
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: New vacuum option to do only freezing