git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b89e151)
Error out on send failure in walsender loop.
Tue, 4 Mar 2014 13:30:52 +0000 (15:30 +0200)
Tue, 4 Mar 2014 13:36:05 +0000 (15:36 +0200)
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.


diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 5227eab414f3f93d79c09a1def7b6c20c1522352..4fcf3d4376ccdc2b01d459ad11da1f01cad5e47f 100644 (file)
--- 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;
}
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /