mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
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
This commit is contained in:
parent
53dcba9be5
commit
4c4aaa19a6
@ -24,10 +24,11 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Logical replication of a table typically starts with taking a snapshot
|
When logical replication of a table typically starts, PostgreSQL takes
|
||||||
of the data on the publisher database and copying that to the subscriber.
|
a snapshot of the table's data on the publisher database and copies it
|
||||||
Once that is done, the changes on the publisher are sent to the subscriber
|
to the subscriber. Once complete, changes on the publisher since the
|
||||||
as they occur in real-time. The subscriber applies the data in the same
|
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
|
order as the publisher so that transactional consistency is guaranteed for
|
||||||
publications within a single subscription. This method of data replication
|
publications within a single subscription. This method of data replication
|
||||||
is sometimes referred to as transactional replication.
|
is sometimes referred to as transactional replication.
|
||||||
@ -165,7 +166,7 @@
|
|||||||
The individual tables can be added and removed dynamically using
|
The individual tables can be added and removed dynamically using
|
||||||
<link linkend="sql-alterpublication"><command>ALTER PUBLICATION</command></link>. Both the <literal>ADD
|
<link linkend="sql-alterpublication"><command>ALTER PUBLICATION</command></link>. Both the <literal>ADD
|
||||||
TABLE</literal> and <literal>DROP TABLE</literal> operations are
|
TABLE</literal> and <literal>DROP TABLE</literal> 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.
|
snapshot once the transaction has committed.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
@ -1954,15 +1955,6 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
|
|||||||
<sect1 id="logical-replication-architecture">
|
<sect1 id="logical-replication-architecture">
|
||||||
<title>Architecture</title>
|
<title>Architecture</title>
|
||||||
|
|
||||||
<para>
|
|
||||||
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.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Logical replication is built with an architecture similar to physical
|
Logical replication is built with an architecture similar to physical
|
||||||
streaming replication (see <xref linkend="streaming-replication"/>). It is
|
streaming replication (see <xref linkend="streaming-replication"/>). It is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user