From 4c4aaa19a6fed39e0eb0247625331c3df34d8211 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 21 Nov 2024 17:14:33 -0500 Subject: [PATCH] doc: clarify how logical replication takes its initial snapshot Reported-by: Koen De Groote Discussion: https://postgr.es/m/171606613152.686.7693963105919927503@wrigleys.postgresql.org Backpatch-through: master --- doc/src/sgml/logical-replication.sgml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index b7e340824ca..8290cd1a083 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -24,10 +24,11 @@ - Logical replication of a table typically starts with taking a snapshot - of the data on the publisher database and copying that to the subscriber. - Once that is done, the changes on the publisher are sent to the subscriber - as they occur in real-time. The subscriber applies the data in the same + When logical replication of a table typically starts, PostgreSQL takes + a snapshot of the table's data on the publisher database and copies it + to the subscriber. Once complete, changes on the publisher since the + initial copy are sent continually to the subscriber. The subscriber + applies the data in the same order as the publisher so that transactional consistency is guaranteed for publications within a single subscription. This method of data replication is sometimes referred to as transactional replication. @@ -165,7 +166,7 @@ The individual tables can be added and removed dynamically using ALTER PUBLICATION. Both the ADD TABLE and DROP TABLE operations are - transactional; so the table will start or stop replicating at the correct + transactional, so the table will start or stop replicating at the correct snapshot once the transaction has committed. @@ -1954,15 +1955,6 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER Architecture - - Logical replication starts by copying a snapshot of the data on the - publisher database. Once that is done, changes on the publisher are sent - to the subscriber as they occur in real time. The subscriber applies data - in the order in which commits were made on the publisher so that - transactional consistency is guaranteed for the publications within any - single subscription. - - Logical replication is built with an architecture similar to physical streaming replication (see ). It is