Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/ref/pg_recvlogical.sgml`
f8de26501d6714b7feee23cc4d212b852d54d2c0f9c02b4a0000000100000f14
      plugin. See <xref linkend="logicaldecoding"/>. This option has no
        effect if the slot already exists.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-s <replaceable>interval_seconds</replaceable></option></term>
      <term><option>--status-interval=<replaceable>interval_seconds</replaceable></option></term>
      <listitem>
       <para>
        This option has the same effect as the option of the same name
        in <xref linkend="app-pgreceivewal"/>.  See the description there.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-S <replaceable>slot_name</replaceable></option></term>
      <term><option>--slot=<replaceable>slot_name</replaceable></option></term>
      <listitem>
       <para>
        In <option>--start</option> mode, use the existing logical replication slot named
        <replaceable>slot_name</replaceable>. In <option>--create-slot</option>
        mode, create the slot with this name. In <option>--drop-slot</option>
        mode, delete the slot with this name.
       </para>
       <para>
        This parameter is required for any of actions.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-t</option></term>
       <term><option>--two-phase</option></term>
       <listitem>
       <para>
        Enables decoding of prepared transactions. This option may only be specified with
        <option>--create-slot</option>.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-v</option></term>
       <term><option>--verbose</option></term>
       <listitem>
       <para>
        Enables verbose mode.
       </para>
       </listitem>
     </varlistentry>
    </variablelist>
   </para>

   <para>
    The following command-line options control the database connection parameters.

    <variablelist>
      <varlistentry>
       <term><option>-d <replaceable>dbname</replaceable></option></term>
       <term><option>--dbname=<replaceable>dbname</replaceable></option></term>
       <listitem>
        <para>
         The database to connect to.  See the description
         of the actions for what this means in detail.
         The <replaceable>dbname</replaceable> can be a <link
         linkend="libpq-connstring">connection string</link>.  If so,
         connection string parameters will override any conflicting
         command line options.
        </para>
        <para>
         This parameter is required for <option>--create-slot</option>
         and <option>--start</option>.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term><option>-h <replaceable>hostname-or-ip</replaceable></option></term>
       <term><option>--host=<replaceable>hostname-or-ip</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 the 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>port</replaceable></option></term>
       <term><option>--port=<replaceable>port</replaceable></option></term>
       <listitem>
        <para>
         Specifies the TCP port or local Unix domain socket file
         extension on which the server is listening for connections.
         Defaults to the <envar>PGPORT</envar> environment variable, if
         set, or a compiled-in default.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term><option>-U

Title: pg_recvlogical Options: Slot Management, Two-Phase Decoding, and Database Connection Parameters
Summary
This section details the remaining options for pg_recvlogical, including specifying the replication slot for start, create, or drop actions; enabling decoding of prepared transactions when creating a slot; enabling verbose mode; and configuring database connection parameters such as database name, hostname, and port. These options are crucial for managing logical replication slots and connecting to the PostgreSQL server.