diff options
author | Heikki Linnakangas | 2014-03-04 13:30:52 +0000 |
---|---|---|
committer | Heikki Linnakangas | 2014-03-04 13:36:05 +0000 |
commit | 7558cc95d31edbf1437321d910562494071c5589 (patch) | |
tree | ec2d2ec5e6e30ca01f3d85e5e3e32abcedac4f3e | |
parent | b89e151054a05f0f6d356ca52e3b725dd0505e53 (diff) |
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.
-rw-r--r-- | src/backend/replication/walsender.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index 5227eab414f..4fcf3d4376c 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -1291,7 +1291,7 @@ WalSndLoop(void) ping_sent = true; /* Try to flush pending output to the client */ if (pq_flush_if_writable() != 0) - break; + goto send_failure; } } |