Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8e41c62

Browse files
committed
Don't abort pg_basebackup when receiving empty WAL block
This is a similar fix as c6ec879 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.
1 parent fc545a2 commit 8e41c62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_basebackup/receivelog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
989989
hdr_len += 8; /* dataStart */
990990
hdr_len += 8; /* walEnd */
991991
hdr_len += 8; /* sendTime */
992-
if (r < hdr_len + 1)
992+
if (r < hdr_len)
993993
{
994994
fprintf(stderr, _("%s: streaming header too small: %d\n"),
995995
progname, r);

0 commit comments

Comments
 (0)