On Wed, 7 May 2008, Bruce Momjian wrote:
Tom Lane wrote:
Greg Smith <[EMAIL PROTECTED]> writes:
The way the option parsing code is done would make complaining in the case
where your parameter is ignored a bit of a contortion.
Yeah. But couldn't we have that part issue a warning if -s had been set
on the command line?
Patch attached that issues a warning.
Turns out it wasn't so contorted. Updated patch attached that only warns
in the exact cases where the setting is ignored, and the warning says how
it's actually setting the scale. I tested all the run types and it
correctly complains only when warranted, samples:
$ ./pgbench -s 200 -i pgbench
10000 tuples done. ...
$ ./pgbench -s 100 pgbench
Scale setting ignored by standard tests, using database branch count
transaction type: TPC-B (sort of)
scaling factor: 200 ...
$ ./pgbench -s 100 -f select.sql pgbench
transaction type: Custom query
scaling factor: 100 ...
* Greg Smith [EMAIL PROTECTED] http://www.gregsmith.com Baltimore, MD
RCS file: /home/gsmith/cvsrepo/pgsql/contrib/pgbench/pgbench.c,v
retrieving revision 1.79
diff -u -r1.79 pgbench.c
--- contrib/pgbench/pgbench.c 19 Mar 2008 03:33:21 -0000 1.79
+++ contrib/pgbench/pgbench.c 9 May 2008 07:12:21 -0000
@@ -1645,6 +1645,9 @@
+ if (scale && (ttype != 3))
+ fprintf(stderr,"Scale setting ignored by standard tests, using
database branch count\n");
remains = nclients;
if (getVariable(&state, "scale") == NULL)
Sent via pgsql-patches mailing list (email@example.com)
To make changes to your subscription: