Home Explore Blog CI



postgresql

7th chunk of `doc/src/sgml/ref/alter_subscription.sgml`
37a572805c853601fa07ed6cab361be9ad9cc1485ce5b9920000000100000c4d
 SKIP</command> command,
      the logical replication worker skips all data modification changes within
      the transaction.  This option has no effect on the transactions that are
      already prepared by enabling
      <link linkend="sql-createsubscription-params-with-two-phase"><literal>two_phase</literal></link>
      on the subscriber.
      After the logical replication worker successfully skips the transaction or
      finishes a transaction, the LSN (stored in
      <structname>pg_subscription</structname>.<structfield>subskiplsn</structfield>)
      is cleared.  See <xref linkend="logical-replication-conflicts"/> for
      the details of logical replication conflicts.
     </para>

     <para>
      <replaceable>skip_option</replaceable> specifies options for this operation.
      The supported option is:

      <variablelist>
       <varlistentry>
        <term><literal>lsn</literal> (<type>pg_lsn</type>)</term>
        <listitem>
         <para>
          Specifies the finish LSN of the remote transaction whose changes
          are to be skipped by the logical replication worker.  The finish LSN
          is the LSN at which the transaction is either committed or prepared.
          Skipping individual subtransactions is not supported.  Setting
          <literal>NONE</literal> resets the LSN.
         </para>
        </listitem>
       </varlistentry>
      </variablelist></para>
    </listitem>
   </varlistentry>

   <varlistentry id="sql-altersubscription-params-new-owner">
    <term><replaceable class="parameter">new_owner</replaceable></term>
    <listitem>
     <para>
      The user name of the new owner of the subscription.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="sql-altersubscription-params-new-name">
    <term><replaceable class="parameter">new_name</replaceable></term>
    <listitem>
     <para>
      The new name for the subscription.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>

  <para>
   When specifying a parameter of type <type>boolean</type>, the
   <literal>=</literal> <replaceable class="parameter">value</replaceable>
   part can be omitted, which is equivalent to
   specifying <literal>TRUE</literal>.
  </para>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   Change the publication subscribed by a subscription to
   <literal>insert_only</literal>:
<programlisting>
ALTER SUBSCRIPTION mysub SET PUBLICATION insert_only;
</programlisting>
  </para>

  <para>
   Disable (stop) the subscription:
<programlisting>
ALTER SUBSCRIPTION mysub DISABLE;
</programlisting></para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   <command>ALTER SUBSCRIPTION</command> is a <productname>PostgreSQL</productname>
   extension.
  </para>
 </refsect1>

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

  <simplelist type="inline">
   <member><xref linkend="sql-createsubscription"/></member>
   <member><xref linkend="sql-dropsubscription"/></member>
   <member><xref linkend="sql-createpublication"/></member>
   <member><xref linkend="sql-alterpublication"/></member>
  </simplelist>
 </refsect1>
</refentry>

Title: ALTER SUBSCRIPTION Parameters (Continued), Examples, Compatibility, and See Also
Summary
This section continues detailing the SKIP option within ALTER SUBSCRIPTION, focusing on the 'lsn' option which specifies the finish LSN (commit or prepared LSN) of the remote transaction to skip. It clarifies that individual subtransactions cannot be skipped and setting 'NONE' resets the LSN. It also describes the parameters new_owner and new_name for renaming the subscription or changing its owner. The section then shows examples of altering a subscription's publication and disabling it, notes that ALTER SUBSCRIPTION is a PostgreSQL extension, and lists related commands.