Home Explore Blog CI



postgresql

5th chunk of `doc/src/sgml/ref/pg_combinebackup.sgml`
c489c473415b2f38f4af569ccccdee6748db24d883ea99b20000000100000d10
    </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_combinebackup</command> will recursively open and synchronize
        all files in the backup directory.  When the plain format is used, the
        search for files will follow symbolic links for the WAL directory and
        each configured tablespace.
       </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
        backup directory.  When the plain format is used,
        <command>pg_combinebackup</command> will also synchronize the file systems
        that contain the WAL files and each tablespace.  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.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-V</option></term>
       <term><option>--version</option></term>
       <listitem>
       <para>
        Prints the <application>pg_combinebackup</application> version and
        exits.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-?</option></term>
       <term><option>--help</option></term>
       <listitem>
       <para>
        Shows help about <application>pg_combinebackup</application> command
        line arguments, and exits.
       </para>
       </listitem>
     </varlistentry>

    </variablelist>
   </para>

 </refsect1>

 <refsect1 id="app-pgcombinebackup-limitations">
  <title>Limitations</title>

  <para>
   <literal>pg_combinebackup</literal> does not recompute page checksums when
   writing the output directory. Therefore, if any of the backups used for
   reconstruction were taken with checksums disabled, but the final backup was
   taken with checksums enabled, the resulting directory may contain pages
   with invalid checksums.
  </para>

  <para>
   To avoid this problem, taking a new full backup after changing the checksum
   state of the cluster using <xref linkend="app-pgchecksums "/> is
   recommended. Otherwise, you can disable and then optionally reenable
   checksums on the directory produced by <literal>pg_combinebackup</literal>
   in order to correct the problem.
  </para>
 </refsect1>

 <refsect1>
  <title>Environment</title>

  <para>
   This utility, like most other <productname>PostgreSQL</productname> utilities,
   uses the environment variables supported by <application>libpq</application>
   (see <xref linkend="libpq-envars"/>).
  </para>

  <para>
   The environment variable <envar>PG_COLOR</envar> specifies whether to use
   color in diagnostic messages. Possible values are
   <literal>always</literal>, <literal>auto</literal> and
   <literal>never</literal>.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="app-pgbasebackup"/></member>
  </simplelist>
 </refsect1>

</refentry>

Title: pg_combinebackup Options: Version, Help, Limitations, and Environment
Summary
The '--sync-method' option controls how pg_combinebackup synchronizes the backup directory, with 'fsync' being the default and 'syncfs' available on Linux. The '--version' option prints the pg_combinebackup version and exits, while '--help' displays command-line arguments. A limitation is that pg_combinebackup doesn't recompute page checksums, potentially leading to invalid checksums if backups with different checksum settings are combined. Taking a new full backup after changing checksum state is recommended. This utility uses libpq environment variables and the PG_COLOR environment variable to control color in diagnostic messages.