postgresql/src
Peter Eisentraut d44032d014 pg_createsubscriber: creates a new logical replica from a standby server
It must be run on the target server and should be able to connect to
the source server (publisher) and the target server (subscriber).  All
tables in the specified database(s) are included in the logical
replication setup.  A pair of publication and subscription objects are
created for each database.

The main advantage of pg_createsubscriber over the common logical
replication setup is the initial data copy.  It also reduces the
catchup phase.

Some prerequisites must be met to successfully run it.  It is
basically the logical replication requirements.  It starts creating a
publication using FOR ALL TABLES and a replication slot for each
specified database.  Write recovery parameters into the target data
directory and start the target server.  It specifies the LSN of the
last replication slot (replication start point) up to which the
recovery will proceed.  Wait until the target server is promoted.
Create one subscription per specified database (using publication and
replication slot created in a previous step) on the target server.
Set the replication progress to the replication start point for each
subscription.  Enable the subscription for each specified database on
the target server.  And finally, change the system identifier on the
target server.

Author: Euler Taveira <euler.taveira@enterprisedb.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Shlok Kyal <shlok.kyal.oss@gmail.com>
Reviewed-by: Vignesh C <vignesh21@gmail.com>
Reviewed-by: Shubham Khanna <khannashubham1197@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/flat/5ac50071-f2ed-4ace-a8fd-b892cffd33eb@www.fastmail.com
2024-03-25 12:42:47 +01:00
..
backend Track last_inactive_time in pg_replication_slots. 2024-03-25 16:34:33 +05:30
bin pg_createsubscriber: creates a new logical replica from a standby server 2024-03-25 12:42:47 +01:00
common Fix convert_case(), introduced in 5c40364dd6. 2024-03-24 16:28:34 -07:00
fe_utils Allow dbname to be written as part of connstring via pg_basebackup's -R option. 2024-03-21 10:50:33 +05:30
include Track last_inactive_time in pg_replication_slots. 2024-03-25 16:34:33 +05:30
interfaces Explicitly require password for SCRAM exchange 2024-03-21 14:45:54 +01:00
makefiles Remove AIX support 2024-02-28 15:17:23 +04:00
pl Activate perlcritic InputOutput::RequireCheckedSyscalls and fix resulting warnings 2024-03-19 07:09:31 +01:00
port Inline pg_popcount{32,64} into pg_popcount(). 2024-03-19 14:46:16 -05:00
template Remove AIX support 2024-02-28 15:17:23 +04:00
test Track last_inactive_time in pg_replication_slots. 2024-03-25 16:34:33 +05:30
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools ci: freebsd repartition script didn't copy .git directory 2024-03-24 08:41:14 +01:00
tutorial
.gitignore
DEVELOPERS
Makefile
Makefile.global.in
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build
nls-global.mk