diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index faa69d14ceb..c1d3d8624bf 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -1207,7 +1207,12 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum) time(NULL)); writeTarData(&state, header, sizeof(header)); - writeTarData(&state, zerobuf, 511); + + /* + * we don't need to pad out to a multiple of the tar block size + * here, because the file is zero length, which is a multiple of + * any block size. + */ } }