Home Explore Blog CI



postgresql

18th chunk of `doc/src/sgml/ref/pg_dump.sgml`
29deb968fd8a0ef0feb015f53a14d0fc69b1ad3ebf94a53d0000000100000fa1
 unless <option>--inserts</option>,
        <option>--column-inserts</option> or
        <option>--rows-per-insert</option> is also specified.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--quote-all-identifiers</option></term>
      <listitem>
       <para>
        Force quoting of all identifiers.  This option is recommended when
        dumping a database from a server whose <productname>PostgreSQL</productname>
        major version is different from <application>pg_dump</application>'s, or when
        the output is intended to be loaded into a server of a different
        major version.  By default, <application>pg_dump</application> quotes only
        identifiers that are reserved words in its own major version.
        This sometimes results in compatibility issues when dealing with
        servers of other versions that may have slightly different sets
        of reserved words.  Using <option>--quote-all-identifiers</option> prevents
        such issues, at the price of a harder-to-read dump script.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--rows-per-insert=<replaceable class="parameter">nrows</replaceable></option></term>
      <listitem>
       <para>
        Dump data as <command>INSERT</command> commands (rather than
        <command>COPY</command>).  Controls the maximum number of rows per
        <command>INSERT</command> command. The value specified must be a
        number greater than zero.  Any error during restoring will cause only
        rows that are part of the problematic <command>INSERT</command> to be
        lost, rather than the entire table contents.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>--section=<replaceable class="parameter">sectionname</replaceable></option></term>
       <listitem>
         <para>
          Only dump the named section. The section name can be
          <option>pre-data</option>, <option>data</option>, or <option>post-data</option>.
          This option can be specified more than once to select multiple
          sections. The default is to dump all sections.
         </para>
         <para>
          The data section contains actual table data, large-object
          contents, statistics for tables and materialized views and
          sequence values.
          Post-data items include definitions of indexes, triggers, rules,
          statistics for indexes, and constraints other than validated check
          constraints.
          Pre-data items include all other data definition items.
         </para>
       </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--sequence-data</option></term>
      <listitem>
       <para>
        Include sequence data in the dump.  This is the default behavior except
        when <option>--no-data</option>, <option>--schema-only</option>, or
        <option>--statistics-only</option> is specified.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--serializable-deferrable</option></term>
      <listitem>
       <para>
        Use a <literal>serializable</literal> transaction for the dump, to
        ensure that the snapshot used is consistent with later database
        states; but do this by waiting for a point in the transaction stream
        at which no anomalies can be present, so that there isn't a risk of
        the dump failing or causing other transactions to roll back with a
        <literal>serialization_failure</literal>.  See <xref linkend="mvcc"/>
        for more information about transaction isolation and concurrency
        control.
       </para>

       <para>
        This option is not beneficial for a dump which is intended only for
        disaster recovery.  It could be useful for a dump used to load a
        copy of the database for reporting or other read-only load sharing
        while

Title: pg_dump Options: `--quote-all-identifiers` to `--serializable-deferrable`
Summary
This section details more pg_dump options. `--quote-all-identifiers` forces quoting of all identifiers for cross-version compatibility, potentially making the script harder to read. `--rows-per-insert=<nrows>` dumps data as INSERT commands, limiting rows per command to `nrows`, minimizing data loss on restore errors. `--section=<sectionname>` limits the dump to a specific section (pre-data, data, or post-data), which can be specified multiple times. `--sequence-data` includes sequence data in the dump (default except with certain other options). `--serializable-deferrable` uses a serializable transaction to ensure a consistent snapshot for the dump, waiting for a point without anomalies.