diff options
Diffstat (limited to 'src/bin/pg_dump/pg_backup_tar.c')
-rw-r--r-- | src/bin/pg_dump/pg_backup_tar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c index 65bcb41a2f8..5c351acda01 100644 --- a/src/bin/pg_dump/pg_backup_tar.c +++ b/src/bin/pg_dump/pg_backup_tar.c @@ -438,8 +438,11 @@ tarClose(ArchiveHandle *AH, TAR_MEMBER *th) * Close the GZ file since we dup'd. This will flush the buffers. */ if (AH->compression != 0) + { + errno = 0; /* in case gzclose() doesn't set it */ if (GZCLOSE(th->zFH) != 0) - fatal("could not close tar member"); + fatal("could not close tar member: %m"); + } if (th->mode == 'w') _tarAddFile(AH, th); /* This will close the temp file */ |