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

Commit 33befe0

Browse files
Fix wording of logical decoding concepts
Be specific about conditions under which we emit >1 copy of message Craig Ringer
1 parent 32c9950 commit 33befe0

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

doc/src/sgml/logicaldecoding.sgml

+15-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
<para>
1414
Changes are sent out in streams identified by logical replication slots.
15-
Each stream outputs each change exactly once.
1615
</para>
1716

1817
<para>
@@ -204,8 +203,7 @@ $ pg_recvlogical -d postgres --slot test --drop-slot
204203
In the context of logical replication, a slot represents a stream of
205204
changes that can be replayed to a client in the order they were made on
206205
the origin server. Each slot streams a sequence of changes from a single
207-
database, sending each change exactly once (except when peeking forward
208-
in the stream).
206+
database.
209207
</para>
210208

211209
<note>
@@ -221,6 +219,20 @@ $ pg_recvlogical -d postgres --slot test --drop-slot
221219
independently of the connection using them and are crash-safe.
222220
</para>
223221

222+
<para>
223+
A logical slot will emit each change just once in normal operation.
224+
The current position of each slot is persisted only at checkpoint, so in
225+
the case of a crash the slot may return to an earlier LSN, which will
226+
then cause recent changes to be resent when the server restarts.
227+
Logical decoding clients are responsible for avoiding ill effects from
228+
handling the same message more than once. Clients may wish to record
229+
the last LSN they saw when decoding and skip over any repeated data or
230+
(when using the replication protocol) request that decoding start from
231+
that LSN rather than letting the server determine the start point.
232+
The Replication Progress Tracking feature is designed for this purpose,
233+
refer to <link linkend="replication-origins">replication origins</link>.
234+
</para>
235+
224236
<para>
225237
Multiple independent slots may exist for a single database. Each slot has
226238
its own state, allowing different consumers to receive changes from

0 commit comments

Comments
 (0)