The upper limit for -c option of pgbench is now obtained from
authorTatsuo Ishii <ishii@postgresql.org>
Sat, 25 Aug 2007 09:21:14 +0000 (09:21 +0000)
committerTatsuo Ishii <ishii@postgresql.org>
Sat, 25 Aug 2007 09:21:14 +0000 (09:21 +0000)
(FD_SETSIZE - 10) rather than a hardwired number.

contrib/pgbench/pgbench.c

index 718f59872c7f362b0471155041548c6bdb2e95fa..4516842da86c8d9da56c312369d03993ad7f91f0 100644 (file)
@@ -53,7 +53,12 @@ extern int   optind;
 /********************************************************************
  * some configurable parameters */
 
-#define MAXCLIENTS 1024                        /* max number of clients allowed */
+/* max number of clients allowed */
+#ifdef FD_SETSIZE
+#define MAXCLIENTS     (FD_SETSIZE - 10)
+#else
+#define MAXCLIENTS     1024
+#endif
 
 int                    nclients = 1;           /* default number of simulated clients */
 int                    nxacts = 10;            /* default number of transactions per clients */