aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_archiver.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-05-26 11:51:04 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-05-26 11:51:11 -0400
commit64b296976befff7ec0debdc82db96b7dd3c7f45a (patch)
tree519b5883521d7a91d64a47e847c636cf010ddebd /src/bin/pg_dump/pg_backup_archiver.c
parent6479df1378607e5edbe19cc28a3b52c62f11d8fa (diff)
downloadpostgresql-64b296976befff7ec0debdc82db96b7dd3c7f45a.tar.gz
postgresql-64b296976befff7ec0debdc82db96b7dd3c7f45a.zip
Make pg_dump behave more sanely when built without HAVE_LIBZ.
For some reason the code to emit a warning and switch to uncompressed output was placed down in the guts of pg_backup_archiver.c. This is definitely too late in the case of parallel operation (and I rather wonder if it wasn't too late for other purposes as well). Put it in pg_dump.c's option-processing logic, which seems a much saner place. Also, the default behavior with custom or directory output format was to emit the warning telling you the output would be uncompressed. This seems unhelpful, so silence that case. Back-patch to 9.3 where parallel dump was introduced. Kyotaro Horiguchi, adjusted a bit by me Report: <20160526.185551.242041780.horiguchi.kyotaro@lab.ntt.co.jp>
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 45fe25f4ec3..bea5df02076 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -3413,17 +3413,7 @@ WriteHead(ArchiveHandle *AH)
(*AH->WriteBytePtr) (AH, AH->intSize);
(*AH->WriteBytePtr) (AH, AH->offSize);
(*AH->WriteBytePtr) (AH, AH->format);
-
-#ifndef HAVE_LIBZ
- if (AH->compression != 0)
- write_msg(modulename, "WARNING: requested compression not available in this "
- "installation -- archive will be uncompressed\n");
-
- AH->compression = 0;
-#endif
-
WriteInt(AH, AH->compression);
-
crtm = *localtime(&AH->createDate);
WriteInt(AH, crtm.tm_sec);
WriteInt(AH, crtm.tm_min);