Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 98cc5db

Browse files
committed
doc: Logical replication documentation improvements
From: Erik Rijkers <er@xs4all.nl>
1 parent 3d9e73e commit 98cc5db

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

doc/src/sgml/logical-replication.sgml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</para>
2525

2626
<para>
27-
Logical replication sends the changes on the publisher to the subscriber as
27+
Logical replication sends changes on the publisher to the subscriber as
2828
they occur in real-time. The subscriber applies the data in the same order
2929
as the publisher so that transactional consistency is guaranteed for
3030
publications within a single subscription. This method of data replication
@@ -44,7 +44,7 @@
4444

4545
<listitem>
4646
<para>
47-
Firing triggers for individual changes as they are incoming to
47+
Firing triggers for individual changes as they arrive on the
4848
subscriber.
4949
</para>
5050
</listitem>
@@ -81,19 +81,19 @@
8181
instance and can be used as a publisher for other databases by defining its
8282
own publications. When the subscriber is treated as read-only by
8383
application, there will be no conflicts from a single subscription. On the
84-
other hand, if there are other writes done either by application or other
85-
subscribers to the same set of tables conflicts can arise.
84+
other hand, if there are other writes done either by an application or by other
85+
subscribers to the same set of tables, conflicts can arise.
8686
</para>
8787

8888
<sect1 id="logical-replication-publication">
8989
<title>Publication</title>
9090

9191
<para>
92-
A <firstterm>publication</firstterm> object can be defined on any physical
92+
A <firstterm>publication</firstterm> can be defined on any physical
9393
replication master. The node where a publication is defined is referred to
9494
as <firstterm>publisher</firstterm>. A publication is a set of changes
95-
generated from a group of tables, and might also be described as a change
96-
set or replication set. Each publication exists in only one database.
95+
generated from a table or a group of tables, and might also be described as
96+
a change set or replication set. Each publication exists in only one database.
9797
</para>
9898

9999
<para>
@@ -105,9 +105,9 @@
105105
</para>
106106

107107
<para>
108-
Publications can choose to limit the changes they produce to show
108+
Publications can choose to limit the changes they produce to
109109
any combination of <command>INSERT</command>, <command>UPDATE</command>, and
110-
<command>DELETE</command> in a similar way to the way triggers are fired by
110+
<command>DELETE</command>, similar to how triggers are fired by
111111
particular event types. If a table without a <literal>REPLICA
112112
IDENTITY</literal> is added to a publication that
113113
replicates <command>UPDATE</command> or <command>DELETE</command>
@@ -121,7 +121,7 @@
121121

122122
<para>
123123
A publication is created using the <xref linkend="sql-createpublication">
124-
command and may be later altered or dropped using corresponding commands.
124+
command and may later be altered or dropped using corresponding commands.
125125
</para>
126126

127127
<para>
@@ -139,9 +139,9 @@
139139
<para>
140140
A <firstterm>subscription</firstterm> is the downstream side of logical
141141
replication. The node where a subscription is defined is referred to as
142-
the <firstterm>subscriber</firstterm>. Subscription defines the connection
142+
the <firstterm>subscriber</firstterm>. A subscription defines the connection
143143
to another database and set of publications (one or more) to which it wants
144-
to be subscribed.
144+
to subscribe.
145145
</para>
146146

147147
<para>
@@ -153,7 +153,7 @@
153153
<para>
154154
A subscriber node may have multiple subscriptions if desired. It is
155155
possible to define multiple subscriptions between a single
156-
publisher-subscriber pair, in which case extra care must be taken to ensure
156+
publisher-subscriber pair, in which case care must be taken to ensure
157157
that the subscribed publication objects don't overlap.
158158
</para>
159159

@@ -163,9 +163,9 @@
163163
</para>
164164

165165
<para>
166-
Subscriptions are not dumped by <command>pg_dump</command> by default but
167-
can be requested using the command-line
168-
option <option>--subscriptions</option>.
166+
Subscriptions are not dumped by <command>pg_dump</command> by default, but
167+
this can be requested using the command-line
168+
option <option>--include-subscriptions</option>.
169169
</para>
170170

171171
<para>
@@ -182,8 +182,8 @@
182182
</para>
183183

184184
<para>
185-
The schema definitions are not replicated and the published tables must
186-
exist on the subsriber for replication to work. Only regular tables may be
185+
The schema definitions are not replicated, and the published tables must
186+
exist on the subscriber. Only regular tables may be
187187
the target of replication. For example, you can't replicate to a view.
188188
</para>
189189

@@ -203,9 +203,9 @@
203203
<title>Conflicts</title>
204204

205205
<para>
206-
The logical replication behaves similarly to normal DML operations in that
206+
Logical replication behaves similarly to normal DML operations in that
207207
the data will be updated even if it was changed locally on the subscriber
208-
node. If the incoming data violates any constraints the replication will
208+
node. If incoming data violates any constraints the replication will
209209
stop. This is referred to as a <firstterm>conflict</firstterm>. When
210210
replicating <command>UPDATE</command> or <command>DELETE</command>
211211
operations, missing data will not produce a conflict and such operations
@@ -224,8 +224,8 @@
224224
transaction that conflicts with the existing data. The transaction can be
225225
skipped by calling the <link linkend="pg-replication-origin-advance">
226226
<function>pg_replication_origin_advance()</function></link> function with
227-
a <parameter>node_name</parameter> corresponding to the subscription name.
228-
The current position of origins can be seen in the
227+
a <parameter>node_name</parameter> corresponding to the subscription name,
228+
and a position. The current position of origins can be seen in the
229229
<link linkend="view-pg-replication-origin-status">
230230
<structname>pg_replication_origin_status</structname></link> system view.
231231
</para>
@@ -246,16 +246,16 @@
246246
<para>
247247
Logical replication is built with an architecture similar to physical
248248
streaming replication (see <xref linkend="streaming-replication">). It is
249-
implemented by <quote>walsender</quote> and the <quote>apply</quote>
250-
processes. The walsender starts logical decoding (described
249+
implemented by <quote>walsender</quote> and <quote>apply</quote>
250+
processes. The walsender process starts logical decoding (described
251251
in <xref linkend="logicaldecoding">) of the WAL and loads the standard
252252
logical decoding plugin (pgoutput). The plugin transforms the changes read
253253
from WAL to the logical replication protocol
254254
(see <xref linkend="protocol-logical-replication">) and filters the data
255255
according to the publication specification. The data is then continuously
256256
transferred using the streaming replication protocol to the apply worker,
257257
which maps the data to local tables and applies the individual changes as
258-
they are received in exact transactional order.
258+
they are received, in correct transactional order.
259259
</para>
260260

261261
<para>
@@ -270,9 +270,9 @@
270270
<title>Monitoring</title>
271271

272272
<para>
273-
Because logical replication is based on similar architecture as
274-
<link linkend="streaming-replication">physical streaming replication</link>
275-
the monitoring on a publication node is very similar to monitoring of
273+
Because logical replication is based on a similar architecture as
274+
<link linkend="streaming-replication">physical streaming replication</link>,
275+
the monitoring on a publication node is similar to monitoring of a
276276
physical replication master
277277
(see <xref linkend="streaming-replication-monitoring">).
278278
</para>
@@ -295,8 +295,8 @@
295295
<title>Security</title>
296296

297297
<para>
298-
Logical replication connections occur in the same way as physical streaming
299-
replication. It requires access to be specifically given using
298+
Logical replication connections occur in the same way as with physical streaming
299+
replication. It requires access to be explicitly given using
300300
<filename>pg_hba.conf</filename>. The role used for the replication
301301
connection must have the <literal>REPLICATION</literal> attribute. This
302302
gives a role access to both logical and physical replication.
@@ -333,7 +333,7 @@
333333
<para>
334334
On the publisher side, <varname>wal_level</varname> must be set to
335335
<literal>logical</literal>, and <varname>max_replication_slots</varname>
336-
has to be set to at least the number of subscriptions expected to connect.
336+
must be set to at least the number of subscriptions expected to connect.
337337
And <varname>max_wal_senders</varname> should be set to at least the same
338338
as <varname>max_replication_slots</varname> plus the number of physical replicas
339339
that are connected at the same time.
@@ -343,7 +343,7 @@
343343
The subscriber also requires the <varname>max_replication_slots</varname>
344344
to be set. In this case it should be set to at least the number of
345345
subscriptions that will be added to the subscriber.
346-
<varname>max_logical_replication_workers</varname> has to be set to at
346+
<varname>max_logical_replication_workers</varname> must be set to at
347347
least the number of subscriptions. Additionally the
348348
<varname>max_worker_processes</varname> may need to be adjusted to
349349
accommodate for replication workers, at least

0 commit comments

Comments
 (0)