summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/ref/pg_basebackup.sgml2
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index 11b7c37c25c..34d2f0bb6c4 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -185,7 +185,7 @@ PostgreSQL documentation
<listitem>
<para>
Enables gzip compression of tar file output, and specifies the
- compression level (1 through 9, 9 being best
+ compression level (0 through 9, 0 being no compression and 9 being best
compression). Compression is only available when using the tar
format.
</para>
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 817977a0702..c78b7ec8853 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1059,7 +1059,7 @@ main(int argc, char **argv)
break;
case 'Z':
compresslevel = atoi(optarg);
- if (compresslevel <= 0 || compresslevel > 9)
+ if (compresslevel < 0 || compresslevel > 9)
{
fprintf(stderr, _("%s: invalid compression level \"%s\"\n"),
progname, optarg);