Home Explore Blog CI



postgresql

20th chunk of `doc/src/sgml/ref/pg_dump.sgml`
0d682d82bb118959ab084e95116afd2bdd0663617b0571e30000000100000fa6
    <listitem>
       <para>
        Require that each
        extension (<option>-e</option>/<option>--extension</option>),
        schema (<option>-n</option>/<option>--schema</option>) and
        table (<option>-t</option>/<option>--table</option>) pattern
        match at least one extension/schema/table in the database to be dumped.
        This also applies to filters used with <option>--filter</option>.
        Note that if none of the extension/schema/table patterns find
        matches, <application>pg_dump</application> will generate an error
        even without <option>--strict-names</option>.
       </para>
       <para>
        This option has no effect
        on <option>--exclude-extension</option>,
        <option>-N</option>/<option>--exclude-schema</option>,
        <option>-T</option>/<option>--exclude-table</option>,
        or <option>--exclude-table-data</option>.  An exclude pattern failing
        to match any objects is not considered an error.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--sync-method=<replaceable class="parameter">method</replaceable></option></term>
      <listitem>
       <para>
        When set to <literal>fsync</literal>, which is the default,
        <command>pg_dump --format=directory</command> will recursively open and
        synchronize all files in the archive directory.
       </para>
       <para>
        On Linux, <literal>syncfs</literal> may be used instead to ask the
        operating system to synchronize the whole file system that contains the
        archive directory.  See <xref linkend="guc-recovery-init-sync-method"/>
        for information about the caveats to be aware of when using
        <literal>syncfs</literal>.
       </para>
       <para>
        This option has no effect when <option>--no-sync</option> is used or
        <option>--format</option> is not set to <literal>directory</literal>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--table-and-children=<replaceable class="parameter">pattern</replaceable></option></term>
      <listitem>
       <para>
        This is the same as
        the <option>-t</option>/<option>--table</option> option,
        except that it also includes any partitions or inheritance child
        tables of the table(s) matching the
        <replaceable class="parameter">pattern</replaceable>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--use-set-session-authorization</option></term>
      <listitem>
       <para>
        Output SQL-standard <command>SET SESSION AUTHORIZATION</command> commands
        instead of <command>ALTER OWNER</command> commands to determine object
        ownership.  This makes the dump more standards-compatible, but
        depending on the history of the objects in the dump, might not restore
        properly.  Also, a dump using <command>SET SESSION AUTHORIZATION</command>
        will certainly require superuser privileges to restore correctly,
        whereas <command>ALTER OWNER</command> requires lesser privileges.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--with-data</option></term>
      <listitem>
       <para>
        Dump data. This is the default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--with-schema</option></term>
      <listitem>
       <para>
        Dump schema (data definitions). This is the default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--with-statistics</option></term>
      <listitem>
       <para>
        Dump statistics.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-?</option></term>
       <term><option>--help</option></term>
       <listitem>
       <para>
       Show help about <application>pg_dump</application> command

Title: pg_dump Options: `--sync-method` to `--help`
Summary
This section details pg_dump options. `--sync-method=<method>` specifies the method used to synchronize files in the archive directory for directory format dumps; `fsync` synchronizes each file, while `syncfs` synchronizes the entire file system (Linux only). `--table-and-children=<pattern>` is the same as `--table`, but also includes partitions or inheritance child tables. `--use-set-session-authorization` outputs `SET SESSION AUTHORIZATION` commands instead of `ALTER OWNER` for object ownership, requiring superuser privileges to restore correctly. `--with-data` dumps data (default). `--with-schema` dumps schema (default). `--with-statistics` dumps statistics. `-?` or `--help` displays help information about the pg_dump command.