Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit74d8c95

Browse files
committed
Fix pg_basebackup so that it accepts 0 as a valid compression level.
The help message for pg_basebackup specifies that the numbers 0 through 9are accepted as valid values of -Z option. But, previously -Z 0 was rejectedas an invalid compression level.Per discussion, it's better to make pg_basebackup treat 0 as validcompression level meaning no compression, like pg_dump.Back-patch to all supported versions.Reported-By: Jeff JanesReviewed-By: Amit KapilaDiscussion: CAMkU=1x+GwjSayc57v6w87ij6iRGFWt=hVfM0B64b1_bPVKRqg@mail.gmail.com
1 parent11653cd commit74d8c95

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎doc/src/sgml/ref/pg_basebackup.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ PostgreSQL documentation
364364
<listitem>
365365
<para>
366366
Enables gzip compression of tar file output, and specifies the
367-
compression level (1 through 9, 9 being best
367+
compression level (0 through 9, 0 being no compression and 9 being best
368368
compression). Compression is only available when using the tar
369369
format.
370370
</para>

‎src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,7 @@ main(int argc, char **argv)
20732073
break;
20742074
case'Z':
20752075
compresslevel=atoi(optarg);
2076-
if (compresslevel <=0||compresslevel>9)
2076+
if (compresslevel<0||compresslevel>9)
20772077
{
20782078
fprintf(stderr,_("%s: invalid compression level \"%s\"\n"),
20792079
progname,optarg);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp