@@ -2323,7 +2323,7 @@ usage(const char *progname)
23232323printf (_ (" -U, --username=NAME database superuser name\n" ));
23242324printf (_ (" -W, --pwprompt prompt for a password for the new superuser\n" ));
23252325printf (_ (" -X, --waldir=WALDIR location for the write-ahead log directory\n" ));
2326- printf (_ (" --wal-segsize=SIZE size ofwal segment size in megabytes\n" ));
2326+ printf (_ (" --wal-segsize=SIZE size ofWAL segments, in megabytes\n" ));
23272327printf (_ ("\nLess commonly used options:\n" ));
23282328printf (_ (" -d, --debug generate lots of debugging output\n" ));
23292329printf (_ (" -k, --data-checksums use data page checksums\n" ));
@@ -3224,11 +3224,17 @@ main(int argc, char *argv[])
32243224wal_segment_size_mb = strtol (str_wal_segment_size_mb ,& endptr ,10 );
32253225
32263226/* verify that wal segment size is valid */
3227- if (* endptr != '\0' ||
3228- !IsValidWalSegSize (wal_segment_size_mb * 1024 * 1024 ))
3227+ if (* endptr != '\0' )
32293228{
32303229fprintf (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" ),
32323238progname );
32333239exit (1 );
32343240}