summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2013-11-11 13:59:55 +0000
committerMagnus Hagander2013-11-11 13:59:55 +0000
commit705556a631c5908cd3caa0b973be13d994ff63e7 (patch)
treee69eb3a07cd209f37045ef1272594b27cc83ba33
parent001e114b8d59f4eaf2a314a2bc5e57078afdf82f (diff)
Don't abort pg_basebackup when receiving empty WAL block
This is a similar fix as c6ec8793aa59d1842082e14b4b4aae7d4bd883fd 9.2. This should never happen in 9.3 and newer since the special case cannot happen there, but this patch synchronizes up the code so there is no confusion on why they're different. An empty block is as harmless in 9.3 as it was in 9.2, and can safely be ignored.
-rw-r--r--src/bin/pg_basebackup/receivelog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c
index 02643eaea94..aca1a9e8b1a 100644
--- a/src/bin/pg_basebackup/receivelog.c
+++ b/src/bin/pg_basebackup/receivelog.c
@@ -989,7 +989,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
hdr_len += 8; /* dataStart */
hdr_len += 8; /* walEnd */
hdr_len += 8; /* sendTime */
- if (r < hdr_len + 1)
+ if (r < hdr_len)
{
fprintf(stderr, _("%s: streaming header too small: %d\n"),
progname, r);