Home Explore Blog CI



postgresql

8th chunk of `doc/src/sgml/ref/pgbench.sgml`
8669b98bdd5f0ca071fc0dda4246f9c1d0c4865663e50e1c0000000100000fa6
  be retried if the total time of all its tries is greater than
        <replaceable>limit</replaceable> ms. To limit only the time of tries
        and not their number, use <literal>--max-tries=0</literal>. By
        default, the option <option>--max-tries</option> is set to 1 and
        transactions with serialization/deadlock errors are not retried. See
        <xref linkend="failures-and-retries"/> for more information about
        retrying such transactions.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-protocol">
      <term><option>-M</option> <replaceable>querymode</replaceable></term>
      <term><option>--protocol=</option><replaceable>querymode</replaceable></term>
      <listitem>
       <para>
        Protocol to use for submitting queries to the server:
          <itemizedlist>
           <listitem>
            <para><literal>simple</literal>: use simple query protocol.</para>
           </listitem>
           <listitem>
            <para><literal>extended</literal>: use extended query protocol.</para>
           </listitem>
           <listitem>
            <para><literal>prepared</literal>: use extended query protocol with prepared statements.</para>
           </listitem>
          </itemizedlist>

        In the <literal>prepared</literal> mode, <application>pgbench</application>
        reuses the parse analysis result starting from the second query
        iteration, so <application>pgbench</application> runs faster
        than in other modes.
       </para>
       <para>
        The default is simple query protocol.  (See <xref linkend="protocol"/>
        for more information.)
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-no-vacuum-run">
      <term><option>-n</option></term>
      <term><option>--no-vacuum</option></term>
      <listitem>
       <para>
        Perform no vacuuming before running the test.
        This option is <emphasis>necessary</emphasis>
        if you are running a custom test scenario that does not include
        the standard tables <structname>pgbench_accounts</structname>,
        <structname>pgbench_branches</structname>, <structname>pgbench_history</structname>, and
        <structname>pgbench_tellers</structname>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-skip-some-updates">
      <term><option>-N</option></term>
      <term><option>--skip-some-updates</option></term>
      <listitem>
       <para>
        Run built-in simple-update script.
        Shorthand for <option>-b simple-update</option>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-progress">
      <term><option>-P</option> <replaceable>sec</replaceable></term>
      <term><option>--progress=</option><replaceable>sec</replaceable></term>
      <listitem>
       <para>
        Show progress report every <replaceable>sec</replaceable> seconds.  The report
        includes the time since the beginning of the run, the TPS since the
        last report, and the transaction latency average, standard deviation,
        and the number of failed transactions since the last report. Under
        throttling (<option>-R</option>), the latency is computed with respect
        to the transaction scheduled start time, not the actual transaction
        beginning time, thus it also includes the average schedule lag time.
        When <option>--max-tries</option> is used to enable transaction retries
        after serialization/deadlock errors, the report includes the number of
        retried transactions and the sum of all retries.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-report-latencies">
      <term><option>-r</option></term>
      <term><option>--report-per-command</option></term>
      <listitem>
       <para>
        Report the following statistics for each command after the benchmark

Title: pgbench Benchmarking Options: Protocol Selection, Vacuuming, Simple Updates, Progress Reporting, and Per-Command Latency Reporting
Summary
This section details pgbench options for selecting the query protocol (simple, extended, prepared), skipping vacuuming, running simple updates, setting progress reporting intervals, and reporting per-command latencies after the benchmark run.