aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuo Ishii <ishii@postgresql.org>2007-08-25 09:21:14 +0000
committerTatsuo Ishii <ishii@postgresql.org>2007-08-25 09:21:14 +0000
commite4a52eca351f39d007c28c61c2055926c895c024 (patch)
tree527944152f0ed9b24bce8c719bdcdd3d1f8093e0
parent52a0830c407e7743062d26cef9f4c6a27c897f08 (diff)
downloadpostgresql-e4a52eca351f39d007c28c61c2055926c895c024.tar.gz
postgresql-e4a52eca351f39d007c28c61c2055926c895c024.zip
The upper limit for -c option of pgbench is now obtained from
(FD_SETSIZE - 10) rather than a hardwired number.
-rw-r--r--contrib/pgbench/pgbench.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index d824c2ca728..1f1f77e66bc 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -1,5 +1,5 @@
/*
- * $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
* written by Tatsuo Ishii
@@ -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 */