logical_repl_caught_up_v2.patch
application/octet-stream
Filename: logical_repl_caught_up_v2.patch
Type: application/octet-stream
Part: 0
Patch
Format: unified
Series: patch v2
| File | + | − |
|---|---|---|
| src/backend/replication/walsender.c | 7 | 0 |
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index fa1db74..441786f 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -2766,6 +2766,13 @@ XLogSendLogical(void)
LogicalDecodingProcessRecord(logical_decoding_ctx, logical_decoding_ctx->reader);
sentPtr = logical_decoding_ctx->reader->EndRecPtr;
+
+ /*
+ * If we've sent a record is at or beyond the flushed point, then
+ * we're caught up.
+ */
+ if (sentPtr >= GetFlushRecPtr())
+ WalSndCaughtUp = true;
}
else
{