Re: [HACKERS] Why are we including netinet/tcp.h so widely?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Why are we including netinet/tcp.h so widely?
Дата
Msg-id 31389.1506747023@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] Why are we including netinet/tcp.h so widely?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> A lot of files which currently include netinet/tcp.h. For most of them I
> cannot recognize why, and it just seems to have been copied from one
> file to the next.

According to POSIX, that supplies TCP_NODELAY, and a look into the
file here finds these other symbols we care about:

#define TCP_KEEPIDLE     4    /* Start keeplives after this period */
#define TCP_KEEPINTVL     5    /* Interval between keepalives */
#define TCP_KEEPCNT     6    /* Number of keepalives before death */

Probably you could drop it from any file not using any TCP_xxx
symbols.  I'd be a little wary of #ifdef checks in any file you're
about to remove it from, though, as those could mask any obvious
breakage.
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] 64-bit queryId?
Следующее
От: Pavel Stehule
Дата:
Сообщение: [HACKERS] extension build issue with PostgreSQL 10 on Centos6