Commit e4a52eca authored by Tatsuo Ishii's avatar Tatsuo Ishii

The upper limit for -c option of pgbench is now obtained from

(FD_SETSIZE - 10) rather than a hardwired number.
parent 52a0830c
/* /*
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.70 2007/08/22 23:03:27 tgl Exp $ * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.71 2007/08/25 09:21:14 ishii Exp $
* *
* pgbench: a simple benchmark program for PostgreSQL * pgbench: a simple benchmark program for PostgreSQL
* written by Tatsuo Ishii * written by Tatsuo Ishii
...@@ -53,7 +53,12 @@ extern int optind; ...@@ -53,7 +53,12 @@ extern int optind;
/******************************************************************** /********************************************************************
* some configurable parameters */ * 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 nclients = 1; /* default number of simulated clients */
int nxacts = 10; /* default number of transactions per clients */ int nxacts = 10; /* default number of transactions per clients */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment