Re: pgbench stats per script & other stuff - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench stats per script & other stuff
Date
Msg-id alpine.DEB.2.10.1507220655270.5636@sto
Whole thread Raw
In response to Re: pgbench stats per script & other stuff  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hello Robert,

>> Pgbench *currently* already accept multiple "-f ..." options, and this is a
>> good thing to test realistic loads which may intermix several kind of
>> transactions, say a lot of readonly and some update or insert, and very rare
>> deletes...
>
> Hmm, I didn't realize that.  The code looks a bit inconsistent right
> now - e.g. we do support multiple files, but pgbench's options-parsing
> loop sets ttype to a value that depends only on the last of -f, -N,
> and -S encountered.

Indeed. However as with current pgbench <nothing>/-N/-S and -f are 
mutually exclusive it is ok to have ttype set as it is.

With the patch pgbench just executes scripts and the options are not 
mutually exclusive: some scripts are internal and others are not, but they 
are treated the same beyond initialization, which helps removing some code 
including the "ttype" variable you mention. The name of the script is kept 
in an SQLScript struct along with its commands, weight and stats.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Linux kernel performance regression tests and Postgres
Next
From: Michael Paquier
Date:
Subject: Re: creating extension including dependencies