From d96560546eada40748bc6e81e225c51bd9a8eab2 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Thu, 21 Mar 2024 00:16:21 -0300 Subject: [PATCH v34 2/4] Remove How it Works section --- doc/src/sgml/ref/pg_createsubscriber.sgml | 128 ---------------------- 1 file changed, 128 deletions(-) diff --git a/doc/src/sgml/ref/pg_createsubscriber.sgml b/doc/src/sgml/ref/pg_createsubscriber.sgml index f0cfed8c47..fc890492a8 100644 --- a/doc/src/sgml/ref/pg_createsubscriber.sgml +++ b/doc/src/sgml/ref/pg_createsubscriber.sgml @@ -373,134 +373,6 @@ PostgreSQL documentation - - How It Works - - - The basic idea is to have a replication start point from the source server - and set up a logical replication to start from this point: - - - - - - Start the target server with the specified command-line options. If the - target server is running, pg_createsubscriber - will terminate with an error. - - - - - - Check if the target server can be converted. There are also a few checks - on the source server. If any of the prerequisites are not met, - pg_createsubscriber will terminate with an - error. - - - - - - Create a publication and replication slot for each specified database on - the source server. Each publication is created using - FOR ALL TABLES. - If option is not specified, it has the - following name pattern: - pg_createsubscriber_%u_%x (parameter: - database oid, random int). - If is not specified, the - replication slot has the following name pattern: - pg_createsubscriber_%u_%x (parameters: - database oid, random int). - These replication slots will be used by the subscriptions in a future step. - The last replication slot LSN is used as a stopping point in the - parameter and by the - subscriptions as a replication start point. It guarantees that no - transaction will be lost. - - - - - - Write recovery parameters into the target data directory and restart the - target server. It specifies an LSN () - of the write-ahead log location up to which recovery will proceed. It also - specifies promote as the action that the server should - take once the recovery target is reached. Additional - recovery parameters - are added to avoid unexpected behavior during the recovery process such as - end of the recovery as soon as a consistent state is reached (WAL should - be applied until the replication start location) and multiple recovery - targets that can cause a failure. This step finishes once the server ends - standby mode and is accepting read-write transactions. - If option is set, - pg_createsubscriber terminates if recovery does - not end until the given number of seconds. - - - - - - Create a subscription for each specified database on the target server. - If is not specified, the subscription - has the following name pattern: - pg_createsubscriber_%u_%x (parameters: - database oid, random int). - It does not copy existing data from the source server. It does not create - a replication slot. Instead, it uses the replication slot that was created - in a previous step. The subscription is created but it is not enabled yet. - The reason is the replication progress must be set to the replication - start point before starting the replication. - - - - - - Drop publications on the target server that were replicated because they - were created before the replication start location. It has no use on the - subscriber. - - - - - - Set the replication progress to the replication start point for each - subscription. When the target server starts the recovery process, it - catches up to the replication start point. This is the exact LSN to be used - as a initial replication location for each subscription. The replication - origin name is obtained since the subscription was created. The replication - origin name and the replication start point are used in - pg_replication_origin_advance() - to set up the initial replication location. - - - - - - Enable the subscription for each specified database on the target server. - The subscription starts applying transactions from the replication start - point. - - - - - - If the standby server was using - primary_slot_name, - it has no use from now on so drop it. - - - - - - Update the system identifier on the target server. The - is run to modify the system identifier. - The target server is stopped as a pg_resetwal requirement. - - - - - Examples -- 2.43.0