Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/ref/pg_createsubscriber.sgml`
c939768f13e9e7838ff7a703629577356bad3f3c1fca2df50000000100000fc0
 the target server on port 50432 to
       avoid unintended client connections.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-P <replaceable class="parameter">connstr</replaceable></option></term>
     <term><option>--publisher-server=<replaceable class="parameter">connstr</replaceable></option></term>
     <listitem>
      <para>
       The connection string to the publisher.  For details see <xref
       linkend="libpq-connstring"/>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-R <replaceable class="parameter">objtype</replaceable></option></term>
     <term><option>--remove=<replaceable class="parameter">objtype</replaceable></option></term>
     <listitem>
      <para>
       Remove all objects of the specified type from specified databases on the
       target server.
      </para>
      <para>
       <itemizedlist>
        <listitem>
         <para>
          <literal>publications</literal>:
          The <literal>FOR ALL TABLES</literal> publications established for this
          subscriber are always removed; specifying this object type causes all
          other publications replicated from the source server to be dropped as
          well.
         </para>
        </listitem>
       </itemizedlist>
      </para>
      <para>
       The objects selected to be dropped are individually logged, including during
       a <option>--dry-run</option>.  There is no opportunity to affect or stop the
       dropping of the selected objects, so consider taking a backup of them
       using <application>pg_dump</application>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-s <replaceable class="parameter">dir</replaceable></option></term>
     <term><option>--socketdir=<replaceable class="parameter">dir</replaceable></option></term>
     <listitem>
      <para>
       The directory to use for postmaster sockets on target server.  The
       default is current directory.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-t <replaceable class="parameter">seconds</replaceable></option></term>
     <term><option>--recovery-timeout=<replaceable class="parameter">seconds</replaceable></option></term>
     <listitem>
      <para>
       The maximum number of seconds to wait for recovery to end.  Setting to
       0 disables.  The default is 0.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-T</option></term>
     <term><option>--enable-two-phase</option></term>
     <listitem>
      <para>
       Enables <link linkend="sql-createsubscription-params-with-two-phase"><literal>two_phase</literal></link>
       commit for the subscription. When multiple databases are specified, this
       option applies uniformly to all subscriptions created on those databases.
       The default is <literal>false</literal>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-U <replaceable class="parameter">username</replaceable></option></term>
     <term><option>--subscriber-username=<replaceable class="parameter">username</replaceable></option></term>
     <listitem>
      <para>
       The user name to connect as on target server.  Defaults to the current
       operating system user name.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-v</option></term>
     <term><option>--verbose</option></term>
     <listitem>
      <para>
       Enables verbose mode.  This will cause
       <application>pg_createsubscriber</application> to output progress
       messages and detailed information about each step to standard error.
       Repeating the option causes additional debug-level messages to appear
       on standard error.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--config-file=<replaceable class="parameter">filename</replaceable></option></term>

Title: pg_createsubscriber Options (continued)
Summary
Continuation of the command-line options for pg_createsubscriber. This includes: -R/--remove to remove publications; -s/--socketdir to set the target server's socket directory; -t/--recovery-timeout to set the maximum wait time for recovery; -T/--enable-two-phase to enable two-phase commit for the subscription; -U/--subscriber-username to specify the username for connecting to the target server; and -v/--verbose for verbose output, with multiple uses increasing verbosity.