Skip to content

Commit c7a0b94

Browse files
committed
Doc: improve description of pgbench script weights.
Point out the workaround to be used if you want to write a script file name that includes "@". Clean up the text a little. Fabien Coelho, additional wordsmithing by me Discussion: https://postgr.es/m/1c4e81550d214741827a03292222db8d@G08CNEXMBPEKD06.g08.fujitsu.local
1 parent 4878674 commit c7a0b94

File tree

1 file changed

+27
-17
lines changed

1 file changed

+27
-17
lines changed

doc/src/sgml/ref/pgbench.sgml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,19 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</>
269269
<term><option>--builtin</>=<replaceable>scriptname[@weight]</></term>
270270
<listitem>
271271
<para>
272-
Add the specified built-in script to the list of executed scripts.
273-
An optional integer weight after <literal>@</> allows to adjust the
274-
probability of drawing the script. If not specified, it is set to 1.
275-
Available built-in scripts are: <literal>tpcb-like</>,
276-
<literal>simple-update</> and <literal>select-only</>.
272+
Add the specified built-in script to the list of scripts to be executed.
273+
Available built-in scripts are: <literal>tpcb-like</literal>,
274+
<literal>simple-update</literal> and <literal>select-only</literal>.
277275
Unambiguous prefixes of built-in names are accepted.
278-
With special name <literal>list</>, show the list of built-in scripts
276+
With the special name <literal>list</literal>, show the list of built-in scripts
279277
and exit immediately.
280278
</para>
279+
<para>
280+
Optionally, write an integer weight after <literal>@</literal> to
281+
adjust the probability of selecting this script versus other ones.
282+
The default weight is 1.
283+
See below for details.
284+
</para>
281285
</listitem>
282286
</varlistentry>
283287

@@ -331,10 +335,16 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</>
331335
<term><option>--file=</><replaceable>filename[@weight]</></term>
332336
<listitem>
333337
<para>
334-
Add a transaction script read from <replaceable>filename</> to
335-
the list of executed scripts.
336-
An optional integer weight after <literal>@</> allows to adjust the
337-
probability of drawing the test.
338+
Add a transaction script read from <replaceable>filename</replaceable>
339+
to the list of scripts to be executed.
340+
</para>
341+
<para>
342+
Optionally, write an integer weight after <literal>@</literal> to
343+
adjust the probability of selecting this script versus other ones.
344+
The default weight is 1.
345+
(To use a script file name that includes an <literal>@</literal>
346+
character, append a weight so that there is no ambiguity, for
347+
example <literal>filen@me@1</literal>.)
338348
See below for details.
339349
</para>
340350
</listitem>
@@ -694,14 +704,14 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</>
694704
<title>What is the <quote>Transaction</> Actually Performed in <application>pgbench</application>?</title>
695705

696706
<para>
697-
<application>pgbench</> executes test scripts chosen randomly
707+
<application>pgbench</application> executes test scripts chosen randomly
698708
from a specified list.
699-
They include built-in scripts with <option>-b</> and
700-
user-provided custom scripts with <option>-f</>.
701-
Each script may be given a relative weight specified after a
702-
<literal>@</> so as to change its drawing probability.
703-
The default weight is <literal>1</>.
704-
Scripts with a weight of <literal>0</> are ignored.
709+
The scripts may include built-in scripts specified with <option>-b</option>
710+
and user-provided scripts specified with <option>-f</option>.
711+
Each script may be given a relative weight specified after an
712+
<literal>@</literal> so as to change its selection probability.
713+
The default weight is <literal>1</literal>.
714+
Scripts with a weight of <literal>0</literal> are ignored.
705715
</para>
706716

707717
<para>

0 commit comments

Comments
 (0)