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:

#define MAXCLIENTS      (FD_SETSIZE - 10)
#define MAXCLIENTS      1024

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?


Reply via email to