diff options
Diffstat (limited to 'src/bin/pg_dump/pg_dump.c')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 2848fa995f1..a958225f1f8 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -589,12 +589,21 @@ main(int argc, char **argv) /* Custom and directory formats are compressed by default, others not */ if (compressLevel == -1) { +#ifdef HAVE_LIBZ if (archiveFormat == archCustom || archiveFormat == archDirectory) compressLevel = Z_DEFAULT_COMPRESSION; else +#endif compressLevel = 0; } +#ifndef HAVE_LIBZ + if (compressLevel != 0) + write_msg(NULL, "WARNING: requested compression not available in this " + "installation -- archive will be uncompressed\n"); + compressLevel = 0; +#endif + /* * On Windows we can only have at most MAXIMUM_WAIT_OBJECTS (= 64 usually) * parallel jobs because that's the maximum limit for the |