Skip to content

Commit 965d1fe

Browse files
committed
fix walsender merge issues
1 parent faab99b commit 965d1fe

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/backend/replication/walsender.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,8 +2475,17 @@ XLogSendLogical(void)
24752475
* If the record we just wanted read is at or beyond the flushed
24762476
* point, then we're caught up.
24772477
*/
2478-
if (logical_decoding_ctx->reader->EndRecPtr >= GetFlushRecPtr()) {
2478+
if (logical_decoding_ctx->reader->EndRecPtr >= GetFlushRecPtr())
2479+
{
24792480
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+
24802489
LogicalDecodingCaughtUp(logical_decoding_ctx);
24812490
}
24822491
}

0 commit comments

Comments
 (0)