From: | Greg Smith <gsmith(at)gregsmith(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pgbench not setting scale size correctly? |
Date: | 2008-03-14 15:24:12 |
Message-ID: | Pine.GSO.4.64.0803141055160.3086@westnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-patches |
On Fri, 14 Mar 2008, Tom Lane wrote:
> "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> writes:
>> You must have initialized pgbench with scale 1.
>
> Yeah, -s is only meaningful when given with -i. Maybe someday we ought
> to fix pgbench to complain if you try to set it at other times.
You have to pass -s in to the actual run if you're specifying your own
custom script(s) using -f and you want the :scale variable to be defined.
But if you're running one of the internal scripts, it just looks in the
database instead, overriding whatever you pass.
The way the option parsing code is done would make complaining in the case
where your parameter is ignored a bit of a contortion. The part that
detects based on the database is after all the other parsing because the
connection has to be brought up first. This is somewhat documented as of
8.3 (I think I submitted that); see the notes on "-s" in
http://www.postgresql.org/docs/current/static/pgbench.html#PGBENCH-RUN-OPTIONS
That could be clearer though, it makes it sound like it's a display only
thing where it's actually quite functional if your custom script uses
scale. I have another pgbench doc patch I'm working on, when I get that
done I'll correct this as well.
--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2008-03-14 15:27:01 | Re: LOCK TABLE HELP |
Previous Message | Micah Yoder | 2008-03-14 15:22:57 | Re: PG secure for financial applications ... |
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim GÜNDÜZ | 2008-03-14 15:31:07 | Re: minor init script fix |
Previous Message | Tom Lane | 2008-03-14 15:09:45 | Re: minor init script fix |