Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/ref/pgbench.sgml`
581127df3ada7452163cc6f985d69d62e6a88a693d45cf460000000100000fa1
 with version 14
            or later of <productname>PostgreSQL</productname> to speed up
            subsequent <command>VACUUM</command>.
            Using <literal>g</literal> causes logging to
            print one message every 100,000 rows while generating data for all
            tables.
           </para>
           <para>
            With <literal>G</literal> (server-side data generation),
            only small queries are sent from the <command>pgbench</command>
            client and then data is actually generated in the server.
            No significant bandwidth is required for this variant, but
            the server will do more work.
            Using <literal>G</literal> causes logging not to print any progress
            message while generating data.
           </para>
           <para>
            The default initialization behavior uses client-side data
            generation (equivalent to <literal>g</literal>).
           </para>
          </listitem>
         </varlistentry>
         <varlistentry id="pgbench-option-init-steps-v">
          <term><literal>v</literal> (Vacuum)</term>
          <listitem>
           <para>
            Invoke <command>VACUUM</command> on the standard tables.
           </para>
          </listitem>
         </varlistentry>
         <varlistentry id="pgbench-option-init-steps-p">
          <term><literal>p</literal> (create Primary keys)</term>
          <listitem>
           <para>
            Create primary key indexes on the standard tables.
           </para>
          </listitem>
         </varlistentry>
         <varlistentry id="pgbench-option-init-steps-f">
         <term><literal>f</literal> (create Foreign keys)</term>
          <listitem>
           <para>
            Create foreign key constraints between the standard tables.
            (Note that this step is not performed by default.)
           </para>
          </listitem>
         </varlistentry>
        </variablelist></para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-fillfactor">
      <term><option>-F</option> <replaceable>fillfactor</replaceable></term>
      <term><option>--fillfactor=</option><replaceable>fillfactor</replaceable></term>
      <listitem>
       <para>
        Create the <structname>pgbench_accounts</structname>,
        <structname>pgbench_tellers</structname> and
        <structname>pgbench_branches</structname> tables with the given fillfactor.
        Default is 100.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-no-vacuum-init">
      <term><option>-n</option></term>
      <term><option>--no-vacuum</option></term>
      <listitem>
       <para>
        Perform no vacuuming during initialization.
        (This option suppresses the <literal>v</literal> initialization step,
        even if it was specified in <option>-I</option>.)
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-quiet">
      <term><option>-q</option></term>
      <term><option>--quiet</option></term>
      <listitem>
       <para>
        Switch logging to quiet mode, producing only one progress message per 5
        seconds. The default logging prints one message each 100,000 rows, which
        often outputs many lines per second (especially on good hardware).
       </para>
       <para>
        This setting has no effect if <literal>G</literal> is specified
        in <option>-I</option>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-scale-init">
      <term><option>-s</option> <replaceable>scale_factor</replaceable></term>
      <term><option>--scale=</option><replaceable>scale_factor</replaceable></term>
      <listitem>
       <para>
        Multiply the number of rows generated by the scale factor.
        For example, <literal>-s 100</literal> will create 10,000,000 rows
        in the <structname>pgbench_accounts</structname> table.

Title: pgbench Initialization Options (Continued): Vacuuming, Primary Keys, Fillfactor, and Scaling
Summary
This section continues detailing pgbench initialization options, including the ability to vacuum tables (v), create primary key indexes (p), and create foreign key constraints (f). It also covers options for setting the fillfactor (-F or --fillfactor) for tables, skipping vacuuming during initialization (-n or --no-vacuum), using quiet logging mode (-q or --quiet), and scaling the number of rows generated (-s or --scale).