Thread: Pgbench with -f and -S

Pgbench with -f and -S

From
Robins Tharakan
Date:
Hi,

Pgbench allows -f and -S combinations together where the doc says that -S effectively uses the internal select-only script. 

Is it okay to assume that -f is disregarded here? Or are they run in round-robin fashion (although then, how does it know which read-only part of my script to run?) or something else like that?

Effectively, I think it should raise NOTICE that -f is useless here.

-
robins
--

-
robins

Re: Pgbench with -f and -S

From
Fabien COELHO
Date:
> Pgbench allows -f and -S combinations together where the doc says that -S
> effectively uses the internal select-only script.
>
> Is it okay to assume that -f is disregarded here? Or are they run in
> round-robin fashion (although then, how does it know which read-only part
> of my script to run?) or something else like that?
>
> Effectively, I think it should raise NOTICE that -f is useless here.

For the future 9.6, scripts options are cumulatives, so -f & -S can be 
combined.

Indeed, for the <= 9.5 it seems that some options are silently ignores, 
when combining -S/-f, only the last one is kept, it should be warned 
about.

-- 
Fabien.



Re: Pgbench with -f and -S

From
Robins Tharakan
Date:

On 17 April 2016 at 21:24, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
For the future 9.6, scripts options are cumulatives, so -f & -S can be combined.

Indeed, for the <= 9.5 it seems that some options are silently ignores, when combining -S/-f, only the last one is kept, it should be warned about.

​Thanks Fabien, for confirming about the missing warning. 

Also, by 'combined' I think you mean that both (built-in SELECTs & Custom Script) run, although the dev docs don't (yet) say anything about that.

-
robins

Re: Pgbench with -f and -S

From
Fabien COELHO
Date:
>> For the future 9.6, scripts options are cumulatives, so -f & -S can be
>> combined.
>>
>> Indeed, for the <= 9.5 it seems that some options are silently ignores,
>> when combining -S/-f, only the last one is kept, it should be warned about.
> ​
> ​Thanks Fabien, for confirming about the missing warning.
>
> Also, by 'combined' I think you mean that both (built-in SELECTs & Custom
> Script) run, although the dev docs don't (yet) say anything about that.

Hmmm... I think it does implicitely, with "add" and "and" in the 
following:

From http://www.postgresql.org/docs/devel/static/pgbench.html:
  -b scriptname[@weight]  Add the specified builtin script to the list of executed scripts. [...]

Idem -f.

And later at the beginning of the Notes:
  pgbench executes test scripts chosen randomly from a specified list.  They include built-in scripts with -b and
user-providedcustom scripts with -f.  [...]
 

-- 
Fabien.

Re: Pgbench with -f and -S

From
Robins Tharakan
Date:
<div dir="ltr">Got it. Thanks for explaining that. Was looking at -S earlier and didn't notice the new -b and @ weight
optionsin 9.6devel.</div><br /><div class="gmail_quote"><div dir="ltr">On Mon, 18 Apr 2016 at 10:54 Fabien COELHO
<<ahref="mailto:coelho@cri.ensmp.fr">coelho@cri.ensmp.fr</a>> wrote:<br /></div><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br /> >> For the future 9.6, scripts
optionsare cumulatives, so -f & -S can be<br /> >> combined.<br /> >><br /> >> Indeed, for the
<=9.5 it seems that some options are silently ignores,<br /> >> when combining -S/-f, only the last one is
kept,it should be warned about.<br /> > ​<br /> > ​Thanks Fabien, for confirming about the missing warning.<br />
><br/> > Also, by 'combined' I think you mean that both (built-in SELECTs & Custom<br /> > Script) run,
althoughthe dev docs don't (yet) say anything about that.<br /><br /> Hmmm... I think it does implicitely, with "add"
and"and" in the<br /> following:<br /><br /> From <a href="http://www.postgresql.org/docs/devel/static/pgbench.html"
rel="noreferrer"target="_blank">http://www.postgresql.org/docs/devel/static/pgbench.html</a>:<br /><br />    -b
scriptname[@weight]<br/>    Add the specified builtin script to the list of executed scripts. [...]<br /><br /> Idem
-f.<br/><br /> And later at the beginning of the Notes:<br /><br />    pgbench executes test scripts chosen randomly
froma specified list.<br />    They include built-in scripts with -b and user-provided custom scripts with -f.<br />  
 [...]<br/><br /> --<br /> Fabien.</blockquote></div><div dir="ltr">-- <br /></div><div dir="ltr"><p dir="ltr">-<br />
robins</div>