Skip to content

Commit a855118

Browse files
committed
Fix debug message output when connecting to a logical slot.
Previously the message erroneously printed the same LSN twice as the assignment to the start_lsn variable was before the message. Correct that. Reported-By: Marko Tiikkaja Author: Marko Tiikkaja Backpatch: 9.5, where logical decoding was introduced
1 parent 073082b commit a855118

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/replication/logical/logical.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,12 @@ CreateDecodingContext(XLogRecPtr start_lsn,
406406
* decoding. Clients have to be able to do that to support synchronous
407407
* replication.
408408
*/
409-
start_lsn = slot->data.confirmed_flush;
410409
elog(DEBUG1, "cannot stream from %X/%X, minimum is %X/%X, forwarding",
411410
(uint32) (start_lsn >> 32), (uint32) start_lsn,
412411
(uint32) (slot->data.confirmed_flush >> 32),
413412
(uint32) slot->data.confirmed_flush);
413+
414+
start_lsn = slot->data.confirmed_flush;
414415
}
415416

416417
ctx = StartupDecodingContext(output_plugin_options,

0 commit comments

Comments
 (0)