File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2323,7 +2323,7 @@ usage(const char *progname)
2323
2323
printf (_ (" -U, --username=NAME database superuser name\n" ));
2324
2324
printf (_ (" -W, --pwprompt prompt for a password for the new superuser\n" ));
2325
2325
printf (_ (" -X, --waldir=WALDIR location for the write-ahead log directory\n" ));
2326
- printf (_ (" --wal-segsize=SIZE size of wal segment size in megabytes\n" ));
2326
+ printf (_ (" --wal-segsize=SIZE size of WAL segments, in megabytes\n" ));
2327
2327
printf (_ ("\nLess commonly used options:\n" ));
2328
2328
printf (_ (" -d, --debug generate lots of debugging output\n" ));
2329
2329
printf (_ (" -k, --data-checksums use data page checksums\n" ));
@@ -3224,11 +3224,17 @@ main(int argc, char *argv[])
3224
3224
wal_segment_size_mb = strtol (str_wal_segment_size_mb , & endptr , 10 );
3225
3225
3226
3226
/* verify that wal segment size is valid */
3227
- if (* endptr != '\0' ||
3228
- !IsValidWalSegSize (wal_segment_size_mb * 1024 * 1024 ))
3227
+ if (* endptr != '\0' )
3229
3228
{
3230
3229
fprintf (stderr ,
3231
- _ ("%s: --wal-segsize must be a power of two between 1 and 1024\n" ),
3230
+ _ ("%s: argument of --wal-segsize must be a number\n" ),
3231
+ progname );
3232
+ exit (1 );
3233
+ }
3234
+ if (!IsValidWalSegSize (wal_segment_size_mb * 1024 * 1024 ))
3235
+ {
3236
+ fprintf (stderr ,
3237
+ _ ("%s: argument of --wal-segsize must be a power of two between 1 and 1024\n" ),
3232
3238
progname );
3233
3239
exit (1 );
3234
3240
}
You can’t perform that action at this time.
0 commit comments