Home Explore Blog CI



postgresql

13th chunk of `doc/src/sgml/ref/pgbench.sgml`
1a59ff50cf50c194f56e716a1739e54f79502f1b349b18a90000000100000fa8
  However, it may also be of great help for debugging, for instance
        re-running a tricky case which leads to an error.
        Use wisely.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-sampling-rate">
      <term><option>--sampling-rate=<replaceable>rate</replaceable></option></term>
      <listitem>
       <para>
        Sampling rate, used when writing data into the log, to reduce the
        amount of log generated. If this option is given, only the specified
        fraction of transactions are logged. 1.0 means all transactions will
        be logged, 0.05 means only 5% of the transactions will be logged.
       </para>
       <para>
        Remember to take the sampling rate into account when processing the
        log file. For example, when computing TPS values, you need to multiply
        the numbers accordingly (e.g., with 0.01 sample rate, you'll only get
        1/100 of the actual TPS).
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-show-script">
      <term><option>--show-script=</option><replaceable>scriptname</replaceable></term>
      <listitem>
       <para>
        Show the actual code of builtin script <replaceable>scriptname</replaceable>
        on stderr, and exit immediately.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-verbose-errors">
      <term><option>--verbose-errors</option></term>
      <listitem>
       <para>
        Print messages about all errors and failures (errors without retrying)
        including which limit for retries was exceeded and how far it was
        exceeded for the serialization/deadlock failures. (Note that in this
        case the output can be significantly increased.)
        See <xref linkend="failures-and-retries"/> for more information.
       </para>
      </listitem>
     </varlistentry>

    </variablelist>
   </para>

 </refsect2>

 <refsect2 id="pgbench-common-options">
  <title>Common Options</title>

   <para>
    <application>pgbench</application> also accepts the following common command-line
    arguments for connection parameters and other common settings:

    <variablelist>
     <varlistentry id="pgbench-option-debug">
      <term><option>--debug</option></term>
      <listitem>
       <para>
        Print debugging output.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-host">
      <term><option>-h</option> <replaceable>hostname</replaceable></term>
      <term><option>--host=</option><replaceable>hostname</replaceable></term>
      <listitem>
       <para>
        The database server's host name
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-port">
      <term><option>-p</option> <replaceable>port</replaceable></term>
      <term><option>--port=</option><replaceable>port</replaceable></term>
      <listitem>
       <para>
        The database server's port number
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-username">
      <term><option>-U</option> <replaceable>login</replaceable></term>
      <term><option>--username=</option><replaceable>login</replaceable></term>
      <listitem>
       <para>
        The user name to connect as
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-version">
      <term><option>-V</option></term>
      <term><option>--version</option></term>
      <listitem>
       <para>
        Print the <application>pgbench</application> version and exit.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-help">
      <term><option>-?</option></term>
      <term><option>--help</option></term>
      <listitem>
       <para>
        Show help about <application>pgbench</application> command line
        arguments, and exit.
       </para>
      </listitem>
     </varlistentry>

Title: pgbench Options: Sampling Rate (Continued), Show Script, Verbose Errors, and Common Options
Summary
This section continues describing pgbench options, including the sampling rate for log data, displaying the code of built-in scripts, printing verbose error messages, and common command-line arguments for connection parameters like hostname, port, username, version, and help.