Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d44032d

Browse files
committed
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
1 parent a11f330 commit d44032d

File tree

9 files changed

+3059
-3
lines changed

9 files changed

+3059
-3
lines changed

doc/src/sgml/ref/allfiles.sgml

+1
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ Complete list of usable sgml source files in this directory.
205205
<!ENTITY pgCombinebackup SYSTEM "pg_combinebackup.sgml">
206206
<!ENTITY pgConfig SYSTEM "pg_config-ref.sgml">
207207
<!ENTITY pgControldata SYSTEM "pg_controldata.sgml">
208+
<!ENTITY pgCreateSubscriber SYSTEM "pg_createsubscriber.sgml">
208209
<!ENTITY pgCtl SYSTEM "pg_ctl-ref.sgml">
209210
<!ENTITY pgDump SYSTEM "pg_dump.sgml">
210211
<!ENTITY pgDumpall SYSTEM "pg_dumpall.sgml">

0 commit comments

Comments
 (0)