forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd44032d
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 tothe source server (publisher) and the target server (subscriber). Alltables in the specified database(s) are included in the logicalreplication setup. A pair of publication and subscription objects arecreated for each database.The main advantage of pg_createsubscriber over the common logicalreplication setup is the initial data copy. It also reduces thecatchup phase.Some prerequisites must be met to successfully run it. It isbasically the logical replication requirements. It starts creating apublication using FOR ALL TABLES and a replication slot for eachspecified database. Write recovery parameters into the target datadirectory and start the target server. It specifies the LSN of thelast replication slot (replication start point) up to which therecovery will proceed. Wait until the target server is promoted.Create one subscription per specified database (using publication andreplication slot created in a previous step) on the target server.Set the replication progress to the replication start point for eachsubscription. Enable the subscription for each specified database onthe target server. And finally, change the system identifier on thetarget 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.com1 parenta11f330 commitd44032d
File tree
9 files changed
+3059
-3
lines changed- doc/src/sgml
- ref
- src/bin/pg_basebackup
- t
9 files changed
+3059
-3
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
| 208 | + | |
208 | 209 |
| |
209 | 210 |
| |
210 | 211 |
| |
|
0 commit comments
Comments
(0)