serialization or deadlock error because its default
value is 1. Use an unlimited number of tries (<literal>--max-tries=0</literal>)
and the <option>--latency-limit</option> option to limit only the maximum time
of tries. You can also use the <option>--time</option> option to limit the
benchmark duration under an unlimited number of tries.
</para>
<para>
Be careful when repeating scripts that contain multiple transactions: the
script is always retried completely, so successful transactions can be
performed several times.
</para>
<para>
Be careful when repeating transactions with shell commands. Unlike the
results of SQL commands, the results of shell commands are not rolled back,
except for the variable value of the <command>\setshell</command> command.
</para>
</note>
<para>
The latency of a successful transaction includes the entire time of
transaction execution with rollbacks and retries. The latency is measured
only for successful transactions and commands but not for failed transactions
or commands.
</para>
<para>
The main report contains the number of failed transactions. If the
<option>--max-tries</option> option is not equal to 1, the main report also
contains statistics related to retries: the total number of retried
transactions and total number of retries. The per-script report inherits all
these fields from the main report. The per-statement report displays retry
statistics only if the <option>--max-tries</option> option is not equal to 1.
</para>
<para>
If you want to group failures by basic types in per-transaction and
aggregation logs, as well as in the main and per-script reports, use the
<option>--failures-detailed</option> option. If you also want to distinguish
all errors and failures (errors without retrying) by type including which
limit for retries was exceeded and how much it was exceeded by for the
serialization/deadlock failures, use the <option>--verbose-errors</option>
option.
</para>
</refsect2>
<refsect2>
<title>Table Access Methods</title>
<para>
You may specify the <link linkend="tableam">Table Access Method</link>
for the pgbench tables. The environment variable <envar>PGOPTIONS</envar>
specifies database configuration options that are passed to PostgreSQL via
the command line (See <xref linkend="config-setting-shell"/>).
For example, a hypothetical default Table Access Method for the tables that
pgbench creates called <literal>wuzza</literal> can be specified with:
<programlisting>
PGOPTIONS='-c default_table_access_method=wuzza'
</programlisting>