12
12
13
13
<para>
14
14
Changes are sent out in streams identified by logical replication slots.
15
- Each stream outputs each change exactly once.
16
15
</para>
17
16
18
17
<para>
@@ -204,8 +203,7 @@ $ pg_recvlogical -d postgres --slot test --drop-slot
204
203
In the context of logical replication, a slot represents a stream of
205
204
changes that can be replayed to a client in the order they were made on
206
205
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.
209
207
</para>
210
208
211
209
<note>
@@ -221,6 +219,20 @@ $ pg_recvlogical -d postgres --slot test --drop-slot
221
219
independently of the connection using them and are crash-safe.
222
220
</para>
223
221
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
+
224
236
<para>
225
237
Multiple independent slots may exist for a single database. Each slot has
226
238
its own state, allowing different consumers to receive changes from
0 commit comments