diff options
author | Amit Kapila <akapila@postgresql.org> | 2025-03-20 12:21:54 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2025-03-20 12:21:54 +0530 |
commit | e5aeed4b8020424fa882c3d1969d00c2b2d8cf30 (patch) | |
tree | 83a4ab15a9a8a4f793c0720a19be8e9c0c257e35 /doc/src | |
parent | 5941946d0934b9eccb0d5bfebd40b155249a0130 (diff) | |
download | postgresql-e5aeed4b8020424fa882c3d1969d00c2b2d8cf30.tar.gz postgresql-e5aeed4b8020424fa882c3d1969d00c2b2d8cf30.zip |
pg_createsubscriber: Add -R publications option.
This patch introduces a new '-R'/'--remove' option in the
'pg_createsubscriber' utility to specify the object types to be removed
from the subscriber. Currently, we add support to specify 'publications'
as an object type. In the future, other object types like failover-slots
could be added.
This feature allows optionally to remove publications on the subscriber
that were replicated from the primary server (before running this tool)
during physical replication. Users may want to retain these publications
in case they want some pre-existing subscribers to point to the newly
created subscriber.
Author: Shubham Khanna <khannashubham1197@gmail.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Reviewed-by: Nisha Moond <nisha.moond412@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CAHv8RjL4OvoYafofTb_U_JD5HuyoNowBoGpMfnEbhDSENA74Kg@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/pg_createsubscriber.sgml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/pg_createsubscriber.sgml b/doc/src/sgml/ref/pg_createsubscriber.sgml index b4b996236e4..380d0b1c35c 100644 --- a/doc/src/sgml/ref/pg_createsubscriber.sgml +++ b/doc/src/sgml/ref/pg_createsubscriber.sgml @@ -147,6 +147,29 @@ PostgreSQL documentation </varlistentry> <varlistentry> + <term><option>-R</option></term> + <term><option>--remove</option></term> + <listitem> + <para> + Remove all objects of the specified type from specified databases on the + target server. + </para> + <para> + publications: The "all tables" 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> + <para> + The objects selected to be dropped are individually logged and do show + up in a --dry-run. There is no opportunity to affect or stop the + dropping of the selected objects so consider taking a backup of them + using pg_dump. + </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> |