aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 1f81bbf4e2a..c40925c1f04 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -966,6 +966,12 @@ parse_compress_options(char *src, WalCompressionMethod *methodres,
int firstlen;
char *firstpart;
+ /*
+ * clear 'levelres' so that if there are multiple compression options,
+ * the last one fully overrides the earlier ones
+ */
+ *levelres = 0;
+
/* check if the option is split in two */
sep = strchr(src, ':');