Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/ref/alter_subscription.sgml`
b2b7f1a1e8fd90e63b2efecd66ea791c804b9100b9a3fd870000000100000fa5
         <para>
          See <xref linkend="sql-createsubscription-notes"/> for details of
          how <literal>copy_data = true</literal> can interact with the
          <link linkend="sql-createsubscription-params-with-origin"><literal>origin</literal></link>
          parameter.
         </para>
         <para>
          See the
          <link linkend="sql-createsubscription-params-with-binary"><literal>binary</literal></link>
          parameter of <command>CREATE SUBSCRIPTION</command> for details about
          copying pre-existing data in binary format.
         </para>
        </listitem>
       </varlistentry>
      </variablelist></para>
    </listitem>
   </varlistentry>

   <varlistentry id="sql-altersubscription-params-enable">
    <term><literal>ENABLE</literal></term>
    <listitem>
     <para>
      Enables a previously disabled subscription, starting the logical
      replication worker at the end of the transaction.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="sql-altersubscription-params-disable">
    <term><literal>DISABLE</literal></term>
    <listitem>
     <para>
      Disables a running subscription, stopping the logical replication
      worker at the end of the transaction.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="sql-altersubscription-params-set">
    <term><literal>SET ( <replaceable class="parameter">subscription_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )</literal></term>
    <listitem>
     <para>
      This clause alters parameters originally set by
      <xref linkend="sql-createsubscription"/>.  See there for more
      information.  The parameters that can be altered are
      <link linkend="sql-createsubscription-params-with-slot-name"><literal>slot_name</literal></link>,
      <link linkend="sql-createsubscription-params-with-synchronous-commit"><literal>synchronous_commit</literal></link>,
      <link linkend="sql-createsubscription-params-with-binary"><literal>binary</literal></link>,
      <link linkend="sql-createsubscription-params-with-streaming"><literal>streaming</literal></link>,
      <link linkend="sql-createsubscription-params-with-disable-on-error"><literal>disable_on_error</literal></link>,
      <link linkend="sql-createsubscription-params-with-password-required"><literal>password_required</literal></link>,
      <link linkend="sql-createsubscription-params-with-run-as-owner"><literal>run_as_owner</literal></link>,
      <link linkend="sql-createsubscription-params-with-origin"><literal>origin</literal></link>,
      <link linkend="sql-createsubscription-params-with-failover"><literal>failover</literal></link>, and
      <link linkend="sql-createsubscription-params-with-two-phase"><literal>two_phase</literal></link>.
      Only a superuser can set <literal>password_required = false</literal>.
     </para>

     <para>
      When altering the
      <link linkend="sql-createsubscription-params-with-slot-name"><literal>slot_name</literal></link>,
      the <literal>failover</literal> and <literal>two_phase</literal> property
      values of the named slot may differ from the counterpart
      <link linkend="sql-createsubscription-params-with-failover"><literal>failover</literal></link>
      and <link linkend="sql-createsubscription-params-with-two-phase"><literal>two_phase</literal></link>
      parameters specified in the subscription. When creating the slot, ensure
      the slot properties <literal>failover</literal> and <literal>two_phase</literal>
      match their counterpart parameters of the subscription.
      Otherwise, the slot on the publisher may behave differently from what these
      subscription options say: for example, the slot on the publisher could either be
      synced to the standbys even when the subscription's
      <link linkend="sql-createsubscription-params-with-failover"><literal>failover</literal></link>
      option is disabled or could be disabled

Title: ALTER SUBSCRIPTION Parameters: Enabling, Disabling, and Setting Subscription Parameters
Summary
This section details the ENABLE and DISABLE parameters for ALTER SUBSCRIPTION, which control the running state of a subscription, starting or stopping the logical replication worker. It also covers the SET clause, which allows modification of parameters originally set during CREATE SUBSCRIPTION. It lists alterable parameters such as slot_name, synchronous_commit, binary, streaming, disable_on_error, password_required, run_as_owner, origin, failover, and two_phase, with specific notes on the interaction between slot properties and subscription parameters for failover and two_phase configurations when altering the slot_name.