Skip to content

Commit 38587d7

Browse files
committed
Error out on send failure in walsender loop.
I changed the loop in 9.3 to use "goto send_failure" instead of "break" on errors, but I missed this one case. It was a relatively harmless bug: if the flush fails once it will most likely fail again as soon as we try to flush the output again. But it's a bug nevertheless. Report and fix by Andres Freund.
1 parent f5f2131 commit 38587d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/replication/walsender.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ WalSndLoop(void)
11001100
ping_sent = true;
11011101
/* Try to flush pending output to the client */
11021102
if (pq_flush_if_writable() != 0)
1103-
break;
1103+
goto send_failure;
11041104
}
11051105
}
11061106

0 commit comments

Comments
 (0)