Home Explore Blog CI



postgresql

12th chunk of `doc/src/sgml/ref/pg_basebackup.sgml`
deee6bca4816b33d70541e552ce2ddf75a24baf1cb80c64e0000000100000fa0
 <listitem>
       <para>
        Prevents the creation of a temporary replication slot
        for the backup.
       </para>
       <para>
        By default, if log streaming is selected but no slot name is given
        with the <option>-S</option> option, then a temporary replication
        slot is created (if supported by the source server).
       </para>
       <para>
        The main purpose of this option is to allow taking a base backup when
        the server has no free replication slots.  Using a replication slot
        is almost always preferred, because it prevents needed WAL from being
        removed by the server during the backup.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--no-verify-checksums</option></term>
      <listitem>
       <para>
        Disables verification of checksums, if they are enabled on the server
        the base backup is taken from.
       </para>
       <para>
        By default, checksums are verified and checksum failures will result
        in a non-zero exit status. However, the base backup will not be
        removed in such a case, as if the <option>--no-clean</option> option
        had been used.  Checksum verification failures will also be reported
        in the <link linkend="monitoring-pg-stat-database-view">
        <structname>pg_stat_database</structname></link> view.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>

   <para>
    The following command-line options control the connection to the source
    server:

    <variablelist>
     <varlistentry>
      <term><option>-d <replaceable class="parameter">connstr</replaceable></option></term>
      <term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
      <listitem>
       <para>
        Specifies parameters used to connect to the server, as a <link
        linkend="libpq-connstring">connection string</link>;  these
        will override any conflicting command line options.
       </para>
       <para>
        This option is called <literal>--dbname</literal> for consistency with other
        client applications, but because <application>pg_basebackup</application>
        doesn't connect to any particular database in the cluster, any database
        name included in the connection string will be ignored by the server.
        However, a database name supplied that way overrides the default
        database name (<literal>replication</literal>) for purposes of
        looking up the replication connection's password
        in <filename>~/.pgpass</filename>.  Similarly, middleware or proxies
        used in connecting to <productname>PostgreSQL</productname> might
        utilize the name for purposes such as connection routing.  The
        database name can also be used
        by <link linkend="logicaldecoding-replication-slots-synchronization">
        logical replication slot synchronization</link>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-h <replaceable class="parameter">host</replaceable></option></term>
      <term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
      <listitem>
       <para>
        Specifies the host name of the machine on which the server is
        running.  If the value begins with a slash, it is used as the
        directory for a Unix domain socket. The default is taken
        from the <envar>PGHOST</envar> environment variable, if set,
        else a Unix domain socket connection is attempted.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-p <replaceable class="parameter">port</replaceable></option></term>
      <term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
      <listitem>
       <para>
        Specifies the TCP port or local Unix domain socket file
        extension on which the

Title: pg_basebackup: Checksum Verification and Connection Options
Summary
This section outlines `pg_basebackup` options concerning checksum verification and connection to the source server. It describes how to disable checksum verification during backups and how to specify connection parameters such as hostname, port, and connection string, overriding command-line options if necessary. The section also clarifies the role of the database name in the connection string, especially for password lookup and logical replication slot synchronization.