aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-03-04 15:30:52 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-03-04 15:43:27 +0200
commit38587d7d286faeec83bdbb89ff34eeee5eabb23e (patch)
treec507d6d1349cf5c344c6d38ea9d7e664fc02685a
parentf5f21315d25ffcbfe7c6a3fa6ffaad54d31bcde0 (diff)
downloadpostgresql-38587d7d286faeec83bdbb89ff34eeee5eabb23e.tar.gz
postgresql-38587d7d286faeec83bdbb89ff34eeee5eabb23e.zip
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index cdd9c6a5334..a0338da0d46 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -1100,7 +1100,7 @@ WalSndLoop(void)
ping_sent = true;
/* Try to flush pending output to the client */
if (pq_flush_if_writable() != 0)
- break;
+ goto send_failure;
}
}