*** a/doc/src/sgml/ref/pg_basebackup.sgml --- b/doc/src/sgml/ref/pg_basebackup.sgml *************** *** 364,370 **** PostgreSQL documentation Enables gzip compression of tar file output, and specifies the ! compression level (1 through 9, 9 being best compression). Compression is only available when using the tar format. --- 364,370 ---- Enables gzip compression of tar file output, and specifies the ! compression level (0 through 9, 0 being no compression and 9 being best compression). Compression is only available when using the tar format. *** a/src/bin/pg_basebackup/pg_basebackup.c --- b/src/bin/pg_basebackup/pg_basebackup.c *************** *** 2073,2079 **** main(int argc, char **argv) break; case 'Z': compresslevel = atoi(optarg); ! if (compresslevel <= 0 || compresslevel > 9) { fprintf(stderr, _("%s: invalid compression level \"%s\"\n"), progname, optarg); --- 2073,2079 ---- break; case 'Z': compresslevel = atoi(optarg); ! if (compresslevel < 0 || compresslevel > 9) { fprintf(stderr, _("%s: invalid compression level \"%s\"\n"), progname, optarg);