Home Explore Blog CI



postgresql

10th chunk of `doc/src/sgml/ref/pg_dump.sgml`
d7af003be34b32f8d2b972a4c6ec04808f49721c2117c6810000000100000fa0
 messages to standard error.
        Repeating the option causes additional debug-level messages
        to appear on standard error.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-V</option></term>
       <term><option>--version</option></term>
       <listitem>
       <para>
       Print the <application>pg_dump</application> version and exit.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-x</option></term>
      <term><option>--no-privileges</option></term>
      <term><option>--no-acl</option></term>
      <listitem>
       <para>
        Prevent dumping of access privileges (grant/revoke commands).
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-Z <replaceable class="parameter">level</replaceable></option></term>
      <term><option>-Z <replaceable class="parameter">method</replaceable></option>[:<replaceable>detail</replaceable>]</term>
      <term><option>--compress=<replaceable class="parameter">level</replaceable></option></term>
      <term><option>--compress=<replaceable class="parameter">method</replaceable></option>[:<replaceable>detail</replaceable>]</term>
      <listitem>
       <para>
        Specify the compression method and/or the compression level to use.
        The compression method can be set to <literal>gzip</literal>,
        <literal>lz4</literal>, <literal>zstd</literal>,
        or <literal>none</literal> for no compression.
        A compression detail string can optionally be specified.  If the
        detail string is an integer, it specifies the compression level.
        Otherwise, it should be a comma-separated list of items, each of the
        form <literal>keyword</literal> or <literal>keyword=value</literal>.
        Currently, the supported keywords are <literal>level</literal> and
        <literal>long</literal>.
       </para>

       <para>
        If no compression level is specified, the default compression
        level will be used. If only a level is specified without mentioning
        an algorithm, <literal>gzip</literal> compression will be used if
        the level is greater than <literal>0</literal>, and no compression
        will be used if the level is <literal>0</literal>.
       </para>

       <para>
        For the custom and directory archive formats, this specifies compression of
        individual table-data segments, and the default is to compress using
        <literal>gzip</literal> at a moderate level. For plain text output,
        setting a nonzero compression level causes the entire output file to be compressed,
        as though it had been fed through <application>gzip</application>,
        <application>lz4</application>, or <application>zstd</application>;
        but the default is not to compress.
        With zstd compression, <literal>long</literal> mode may improve the
        compression ratio, at the cost of increased memory use.
       </para>
       <para>
        The tar archive format currently does not support compression at all.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--binary-upgrade</option></term>
      <listitem>
       <para>
        This option is for use by in-place upgrade utilities.  Its use
        for other purposes is not recommended or supported.  The
        behavior of the option may change in future releases without
        notice.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--column-inserts</option></term>
      <term><option>--attribute-inserts</option></term>
      <listitem>
       <para>
        Dump data as <command>INSERT</command> commands with explicit
        column names (<literal>INSERT INTO
        <replaceable>table</replaceable>
        (<replaceable>column</replaceable>, ...) VALUES
        ...</literal>).  This will make restoration very slow; it is mainly
 

Title: pg_dump Options: Compression, Binary Upgrade, and Column Inserts
Summary
This section describes the remaining pg_dump options, starting with `-Z/--compress`, which specifies the compression method (gzip, lz4, zstd, or none) and level. The level defaults to a moderate value. For custom and directory formats, this applies to individual table data segments. For plain text, it compresses the entire output (like piping through gzip/lz4/zstd). Tar archives don't support compression. Next, `--binary-upgrade` is intended for in-place upgrade utilities and its use is discouraged otherwise. Lastly, `--column-inserts/--attribute-inserts` dumps data as INSERT commands with explicit column names, which slows down restoration considerably and is intended mainly for testing.