FD_SETSIZE on Linux?

Поиск
Список
Период
Сортировка
От Thom Brown
Тема FD_SETSIZE on Linux?
Дата
Msg-id CAA-aLv4ftLRHSb+vVyuotVMoE1pqxk9LxawoNrfzF0Z=SG46QA@mail.gmail.com
обсуждение исходный текст
Ответы Re: FD_SETSIZE on Linux?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

I noticed when trying to set pgbench's client count to a high number, I had to reduce it, and I found the maximum I can get away with is 1014.  Any higher and I get:

invalid number of clients: 1015

I find this in pgbench.c:

#ifdef FD_SETSIZE
#define MAXCLIENTS      (FD_SETSIZE - 10)
#else
#define MAXCLIENTS      1024
#endif


And FS_SETSIZE defined before it:

#ifdef WIN32
#define FD_SETSIZE 1024                 /* set before winsock2.h is included */
#endif   /* ! WIN32 */

... but apparently only if using Windows, which I'm not.

So it appears that MAXCLIENTS is being set to 1014 (1024 - 10), which looks like should only be the case on Windows.

I'm a bit confused here.  Shouldn't my MAXCLIENTS be set to 1024?

Thom

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [Fwd: Re: proposal: new long psql parameter --on-error-stop]
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: bad estimation together with large work_mem generates terrible slow hash joins