We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faab99b commit 965d1feCopy full SHA for 965d1fe
src/backend/replication/walsender.c
@@ -2475,8 +2475,17 @@ XLogSendLogical(void)
2475
* If the record we just wanted read is at or beyond the flushed
2476
* point, then we're caught up.
2477
*/
2478
- if (logical_decoding_ctx->reader->EndRecPtr >= GetFlushRecPtr()) {
+ if (logical_decoding_ctx->reader->EndRecPtr >= GetFlushRecPtr())
2479
+ {
2480
WalSndCaughtUp = true;
2481
+
2482
+ /*
2483
+ * Have WalSndLoop() terminate the connection in an orderly
2484
+ * manner, after writing out all the pending data.
2485
+ */
2486
+ if (got_STOPPING)
2487
+ got_SIGUSR2 = true;
2488
2489
LogicalDecodingCaughtUp(logical_decoding_ctx);
2490
}
2491
0 commit comments