diff options
Diffstat (limited to 'src/bin/pg_basebackup/pg_basebackup.c')
-rw-r--r-- | src/bin/pg_basebackup/pg_basebackup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index ac07a0ef009..095953b1c96 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -1160,10 +1160,11 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum) #ifdef HAVE_LIBZ if (ztarfile != NULL) { + errno = 0; /* in case gzclose() doesn't set it */ if (gzclose(ztarfile) != 0) { - pg_log_error("could not close compressed file \"%s\": %s", - filename, get_gz_error(ztarfile)); + pg_log_error("could not close compressed file \"%s\": %m", + filename); exit(1); } } |