v32-0002-Remove-How-it-Works-section.patch
application/x-patch
Filename: v32-0002-Remove-How-it-Works-section.patch
Type: application/x-patch
Part: 1
Message:
Re: speed up a logical replica setup
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v32-0002
Subject: Remove How it Works section
| File | + | − |
|---|---|---|
| doc/src/sgml/ref/pg_createsubscriber.sgml | 0 | 128 |
From 22b5a065f7116bb3f9ba44500eb1a1948e523410 Mon Sep 17 00:00:00 2001 From: Euler Taveira <euler.taveira@enterprisedb.com> Date: Thu, 21 Mar 2024 00:16:21 -0300 Subject: [PATCH v32 2/3] 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 </refsect1> - <refsect1> - <title>How It Works</title> - - <para> - 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: - </para> - - <procedure> - <step> - <para> - Start the target server with the specified command-line options. If the - target server is running, <application>pg_createsubscriber</application> - will terminate with an error. - </para> - </step> - - <step> - <para> - 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, - <application>pg_createsubscriber</application> will terminate with an - error. - </para> - </step> - - <step> - <para> - Create a publication and replication slot for each specified database on - the source server. Each publication is created using - <link linkend="sql-createpublication-params-for-all-tables"><literal>FOR ALL TABLES</literal></link>. - If <option>publication-name</option> option is not specified, it has the - following name pattern: - <quote><literal>pg_createsubscriber_%u_%x</literal></quote> (parameter: - database <parameter>oid</parameter>, random <parameter>int</parameter>). - If <option>replication-slot-name</option> is not specified, the - replication slot has the following name pattern: - <quote><literal>pg_createsubscriber_%u_%x</literal></quote> (parameters: - database <parameter>oid</parameter>, random <parameter>int</parameter>). - 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 - <xref linkend="guc-recovery-target-lsn"/> parameter and by the - subscriptions as a replication start point. It guarantees that no - transaction will be lost. - </para> - </step> - - <step> - <para> - Write recovery parameters into the target data directory and restart the - target server. It specifies an LSN (<xref linkend="guc-recovery-target-lsn"/>) - of the write-ahead log location up to which recovery will proceed. It also - specifies <literal>promote</literal> as the action that the server should - take once the recovery target is reached. Additional - <link linkend="runtime-config-wal-recovery-target">recovery parameters</link> - 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>--recovery-timeout</option> option is set, - <application>pg_createsubscriber</application> terminates if recovery does - not end until the given number of seconds. - </para> - </step> - - <step> - <para> - Create a subscription for each specified database on the target server. - If <option>subscription-name</option> is not specified, the subscription - has the following name pattern: - <quote><literal>pg_createsubscriber_%u_%x</literal></quote> (parameters: - database <parameter>oid</parameter>, random <parameter>int</parameter>). - 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. - </para> - </step> - - <step> - <para> - 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. - </para> - </step> - - <step> - <para> - 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 - <link linkend="pg-replication-origin-advance"><function>pg_replication_origin_advance()</function></link> - to set up the initial replication location. - </para> - </step> - - <step> - <para> - Enable the subscription for each specified database on the target server. - The subscription starts applying transactions from the replication start - point. - </para> - </step> - - <step> - <para> - If the standby server was using - <link linkend="guc-primary-slot-name"><varname>primary_slot_name</varname></link>, - it has no use from now on so drop it. - </para> - </step> - - <step> - <para> - Update the system identifier on the target server. The - <xref linkend="app-pgresetwal"/> is run to modify the system identifier. - The target server is stopped as a <command>pg_resetwal</command> requirement. - </para> - </step> - </procedure> - </refsect1> - <refsect1> <title>Examples</title> -- 2.34.1