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

Commit928e92f

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 parentc0782a1 commit928e92f

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
@@ -343,7 +343,7 @@ PostgreSQL documentation
343343
<listitem>
344344
<para>
345345
Enables gzip compression of tar file output, and specifies the
346-
compression level (1 through 9, 9 being best
346+
compression level (0 through 9, 0 being no compression and 9 being best
347347
compression). Compression is only available when using the tar
348348
format.
349349
</para>

‎src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2050,7 +2050,7 @@ main(int argc, char **argv)
20502050
break;
20512051
case'Z':
20522052
compresslevel=atoi(optarg);
2053-
if (compresslevel <=0||compresslevel>9)
2053+
if (compresslevel<0||compresslevel>9)
20542054
{
20552055
fprintf(stderr,_("%s: invalid compression level \"%s\"\n"),
20562056
progname,optarg);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp