aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2025-03-28 12:26:39 +0530
committerAmit Kapila <akapila@postgresql.org>2025-03-28 12:26:39 +0530
commitfb2ea12f42b9453853be043b8ed107e136e1ccb7 (patch)
tree883577e3fdf4417f80006447288cfe05a818bb94 /doc/src
parent890fc826c91f153ae8c084d3a008f91798495b13 (diff)
downloadpostgresql-fb2ea12f42b9453853be043b8ed107e136e1ccb7.tar.gz
postgresql-fb2ea12f42b9453853be043b8ed107e136e1ccb7.zip
pg_createsubscriber: Add '--all' option.
The '--all' option indicates that the tool queries the source server (publisher) for all databases and creates subscriptions on the target server (subscriber) for databases with matching names. Without this user needs to explicitly specify all databases by using -d option for each database. This simplifies converting a physical standby to a logical subscriber, particularly during upgrades. The options '--database', '--publication', '--subscription', and '--replication-slot' cannot be used when '--all' is specified. Author: Shubham Khanna <khannashubham1197@gmail.com> Reviewed-by: vignesh C <vignesh21@gmail.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Reviewed-by: Euler Taveira <euler@eulerto.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Reviewed-by: Peter Smith <smithpb2250@gmail.com> Reviewed-by: Shlok Kyal <shlok.kyal.oss@gmail.com> Discussion: https://postgr.es/m/CAHv8RjKhA=_h5vAbozzJ1Opnv=KXYQHQ-fJyaMfqfRqPpnC2bA@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pg_createsubscriber.sgml37
1 files changed, 30 insertions, 7 deletions
diff --git a/doc/src/sgml/ref/pg_createsubscriber.sgml b/doc/src/sgml/ref/pg_createsubscriber.sgml
index d011b79e5e6..1f0ddd7f9f2 100644
--- a/doc/src/sgml/ref/pg_createsubscriber.sgml
+++ b/doc/src/sgml/ref/pg_createsubscriber.sgml
@@ -88,16 +88,36 @@ PostgreSQL documentation
<variablelist>
<varlistentry>
+ <term><option>-a</option></term>
+ <term><option>--all</option></term>
+ <listitem>
+ <para>
+ Create one subscription per database on the target server. Exceptions
+ are template databases and databases that don't allow connections.
+ If the database name is not specified in publisher-server, the postgres
+ database will be used, or if that does not exist, template1 will be used.
+ Automatically generated names for subscriptions, publications, and
+ replication slots are used when this option is specified.
+ This option cannot be used along with <option>--database</option>,
+ <option>--publication</option>, <option>--replication-slot</option>, or
+ <option>--subscription</option>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-d <replaceable class="parameter">dbname</replaceable></option></term>
<term><option>--database=<replaceable class="parameter">dbname</replaceable></option></term>
<listitem>
<para>
The name of the database in which to create a subscription. Multiple
databases can be selected by writing multiple <option>-d</option>
- switches. If <option>-d</option> option is not provided, the database
- name will be obtained from <option>-P</option> option. If the database
- name is not specified in either the <option>-d</option> option or
- <option>-P</option> option, an error will be reported.
+ switches. This option cannot be used together with <option>-a</option>.
+ If <option>-d</option> option is not provided, the database name will be
+ obtained from <option>-P</option> option. If the database name is not
+ specified in either the <option>-d</option> option, or the
+ <option>-P</option> option, and <option>-a</option> option is not
+ specified, an error will be reported.
</para>
</listitem>
</varlistentry>
@@ -253,7 +273,8 @@ PostgreSQL documentation
names must match the number of specified databases, otherwise an error
is reported. The order of the multiple publication name switches must
match the order of database switches. If this option is not specified,
- a generated name is assigned to the publication name.
+ a generated name is assigned to the publication name. This option cannot
+ be used together with <option>--all</option>.
</para>
</listitem>
</varlistentry>
@@ -269,7 +290,8 @@ PostgreSQL documentation
otherwise an error is reported. The order of the multiple replication
slot name switches must match the order of database switches. If this
option is not specified, the subscription name is assigned to the
- replication slot name.
+ replication slot name. This option cannot be used together with
+ <option>--all</option>.
</para>
</listitem>
</varlistentry>
@@ -284,7 +306,8 @@ PostgreSQL documentation
names must match the number of specified databases, otherwise an error
is reported. The order of the multiple subscription name switches must
match the order of database switches. If this option is not specified,
- a generated name is assigned to the subscription name.
+ a generated name is assigned to the subscription name. This option cannot
+ be used together with <option>--all</option>.
</para>
</listitem>
</varlistentry>