From 82ed7748b710e3ddce3f7ebc74af80fe4869492f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 6 Apr 2021 10:44:26 +0200 Subject: 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 Author: Bharath Rupireddy Discussion: https://www.postgresql.org/message-id/flat/MEYP282MB166939D0D6C480B7FBE7EFFBB6BC0@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM --- doc/src/sgml/ref/alter_subscription.sgml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'doc/src') 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 ALTER SUBSCRIPTION name CONNECTION 'conninfo' ALTER SUBSCRIPTION name SET PUBLICATION publication_name [, ...] [ WITH ( set_publication_option [= value] [, ... ] ) ] +ALTER SUBSCRIPTION name ADD PUBLICATION publication_name [, ...] [ WITH ( set_publication_option [= value] [, ... ] ) ] +ALTER SUBSCRIPTION name DROP PUBLICATION publication_name [, ...] [ WITH ( set_publication_option [= value] [, ... ] ) ] ALTER SUBSCRIPTION name REFRESH PUBLICATION [ WITH ( refresh_option [= value] [, ... ] ) ] ALTER SUBSCRIPTION name ENABLE ALTER SUBSCRIPTION name DISABLE @@ -63,7 +65,7 @@ ALTER SUBSCRIPTION name RENAME TO < Commands ALTER SUBSCRIPTION ... REFRESH PUBLICATION and - ALTER SUBSCRIPTION ... SET PUBLICATION ... with refresh + ALTER SUBSCRIPTION ... {SET|ADD|DROP} PUBLICATION ... with refresh option as true cannot be executed inside a transaction block. @@ -94,12 +96,19 @@ ALTER SUBSCRIPTION name RENAME TO < SET PUBLICATION publication_name + ADD PUBLICATION publication_name + DROP PUBLICATION publication_name - Changes list of subscribed publications. See - for more information. - By default this command will also act like REFRESH - PUBLICATION. + Changes the list of subscribed publications. SET + replaces the entire list of publications with a new list, + ADD adds additional publications, + DROP removes publications from the list of + publications. See for more + information. By default, this command will also act like + REFRESH PUBLICATION, except that in case of + ADD or DROP, only the added or + dropped publications are refreshed. -- cgit v1.2.3