diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2021-04-06 10:44:26 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2021-04-06 11:49:51 +0200 |
commit | 82ed7748b710e3ddce3f7ebc74af80fe4869492f (patch) | |
tree | 777753e1b7b44a8f0848d2a43df515010dcbb201 /doc/src | |
parent | 266b5673b4b6bed2e9ebfe73ca967f44d6dc0e6c (diff) | |
download | postgresql-82ed7748b710e3ddce3f7ebc74af80fe4869492f.tar.gz postgresql-82ed7748b710e3ddce3f7ebc74af80fe4869492f.zip |
ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION
At present, if we want to update publications in a subscription, we
can use SET PUBLICATION. However, it requires supplying all
publications that exists and the new publications. If we want to add
new publications, it's inconvenient. The new syntax only supplies the
new publications. When the refresh is true, it only refreshes the new
publications.
Author: Japin Li <japinli@hotmail.com>
Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/MEYP282MB166939D0D6C480B7FBE7EFFBB6BC0@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/alter_subscription.sgml | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml index 5aed2694350..367ac814f4b 100644 --- a/doc/src/sgml/ref/alter_subscription.sgml +++ b/doc/src/sgml/ref/alter_subscription.sgml @@ -23,6 +23,8 @@ PostgreSQL documentation <synopsis> ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> CONNECTION '<replaceable>conninfo</replaceable>' ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> SET PUBLICATION <replaceable class="parameter">publication_name</replaceable> [, ...] [ WITH ( <replaceable class="parameter">set_publication_option</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) ] +ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> ADD PUBLICATION <replaceable class="parameter">publication_name</replaceable> [, ...] [ WITH ( <replaceable class="parameter">set_publication_option</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) ] +ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> DROP PUBLICATION <replaceable class="parameter">publication_name</replaceable> [, ...] [ WITH ( <replaceable class="parameter">set_publication_option</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) ] ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> REFRESH PUBLICATION [ WITH ( <replaceable class="parameter">refresh_option</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) ] ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> ENABLE ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> DISABLE @@ -63,7 +65,7 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO < <para> Commands <command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command> and - <command>ALTER SUBSCRIPTION ... SET PUBLICATION ...</command> with refresh + <command>ALTER SUBSCRIPTION ... {SET|ADD|DROP} PUBLICATION ...</command> with refresh option as true cannot be executed inside a transaction block. </para> </refsect1> @@ -94,12 +96,19 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO < <varlistentry> <term><literal>SET PUBLICATION <replaceable class="parameter">publication_name</replaceable></literal></term> + <term><literal>ADD PUBLICATION <replaceable class="parameter">publication_name</replaceable></literal></term> + <term><literal>DROP PUBLICATION <replaceable class="parameter">publication_name</replaceable></literal></term> <listitem> <para> - Changes list of subscribed publications. See - <xref linkend="sql-createsubscription"/> for more information. - By default this command will also act like <literal>REFRESH - PUBLICATION</literal>. + Changes the list of subscribed publications. <literal>SET</literal> + replaces the entire list of publications with a new list, + <literal>ADD</literal> adds additional publications, + <literal>DROP</literal> removes publications from the list of + publications. See <xref linkend="sql-createsubscription"/> for more + information. By default, this command will also act like + <literal>REFRESH PUBLICATION</literal>, except that in case of + <literal>ADD</literal> or <literal>DROP</literal>, only the added or + dropped publications are refreshed. </para> <para> |