summaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/pg_receivewal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_basebackup/pg_receivewal.c')
-rw-r--r--src/bin/pg_basebackup/pg_receivewal.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
index f064cff4aba..a6e3387a6d4 100644
--- a/src/bin/pg_basebackup/pg_receivewal.c
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -875,38 +875,11 @@ main(int argc, char **argv)
pg_fatal("invalid compression specification: %s",
error_detail);
- /* Extract the compression level, if found in the specification */
- if ((compression_spec.options & PG_COMPRESSION_OPTION_LEVEL) != 0)
- compresslevel = compression_spec.level;
-
- switch (compression_algorithm)
- {
- case PG_COMPRESSION_NONE:
- /* nothing to do */
- break;
- case PG_COMPRESSION_GZIP:
-#ifdef HAVE_LIBZ
- if ((compression_spec.options & PG_COMPRESSION_OPTION_LEVEL) == 0)
- {
- pg_log_info("no value specified for --compress, switching to default");
- compresslevel = Z_DEFAULT_COMPRESSION;
- }
-#else
- pg_fatal("this build does not support compression with %s",
- "gzip");
-#endif
- break;
- case PG_COMPRESSION_LZ4:
-#ifndef USE_LZ4
- pg_fatal("this build does not support compression with %s",
- "LZ4");
-#endif
- break;
- case PG_COMPRESSION_ZSTD:
- pg_fatal("compression with %s is not yet supported", "ZSTD");
- break;
- }
+ /* Extract the compression level */
+ compresslevel = compression_spec.level;
+ if (compression_algorithm == PG_COMPRESSION_ZSTD)
+ pg_fatal("compression with %s is not yet supported", "ZSTD");
/*
* Check existence of destination folder.