Skip to content

Commit e4a52ec

Browse files
committed
The upper limit for -c option of pgbench is now obtained from
(FD_SETSIZE - 10) rather than a hardwired number.
1 parent 52a0830 commit e4a52ec

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

contrib/pgbench/pgbench.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.70 2007/08/22 23:03:27 tgl Exp $
2+
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.71 2007/08/25 09:21:14 ishii Exp $
33
*
44
* pgbench: a simple benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -53,7 +53,12 @@ extern int optind;
5353
/********************************************************************
5454
* some configurable parameters */
5555

56-
#define MAXCLIENTS 1024 /* max number of clients allowed */
56+
/* max number of clients allowed */
57+
#ifdef FD_SETSIZE
58+
#define MAXCLIENTS (FD_SETSIZE - 10)
59+
#else
60+
#define MAXCLIENTS 1024
61+
#endif
5762

5863
int nclients = 1; /* default number of simulated clients */
5964
int nxacts = 10; /* default number of transactions per clients */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy