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

Commit5d58c07

Browse files
committed
initdb pg_basebackup: Rename --noxxx options to --no-xxx
--noclean and --nosync were the only options spelled without a hyphen,so change this for consistency with other options. The options inpg_basebackup have not been in a release, so we just rename them. Forinitdb, we retain the old variants.Vik Fearing and me
1 parentcaf936b commit5d58c07

File tree

7 files changed

+18
-16
lines changed

7 files changed

+18
-16
lines changed

‎doc/src/sgml/ref/initdb.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ PostgreSQL documentation
235235

236236
<varlistentry>
237237
<term><option>-N</option></term>
238-
<term><option>--nosync</option></term>
238+
<term><option>--no-sync</option></term>
239239
<listitem>
240240
<para>
241241
By default, <command>initdb</command> will wait for all files to be
@@ -355,7 +355,7 @@ PostgreSQL documentation
355355

356356
<varlistentry>
357357
<term><option>-n</option></term>
358-
<term><option>--noclean</option></term>
358+
<term><option>--no-clean</option></term>
359359
<listitem>
360360
<para>
361361
By default, when <command>initdb</command>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ PostgreSQL documentation
400400

401401
<varlistentry>
402402
<term><option>-n</option></term>
403-
<term><option>--noclean</option></term>
403+
<term><option>--no-clean</option></term>
404404
<listitem>
405405
<para>
406406
By default, when <command>pg_basebackup</command> aborts with an
@@ -440,7 +440,7 @@ PostgreSQL documentation
440440

441441
<varlistentry>
442442
<term><option>-N</option></term>
443-
<term><option>--nosync</option></term>
443+
<term><option>--no-sync</option></term>
444444
<listitem>
445445
<para>
446446
By default, <command>pg_basebackup</command> will wait for all files

‎src/bin/initdb/initdb.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,8 +2402,8 @@ usage(const char *progname)
24022402
printf(_(" -d, --debug generate lots of debugging output\n"));
24032403
printf(_(" -k, --data-checksums use data page checksums\n"));
24042404
printf(_(" -L DIRECTORY where to find the input files\n"));
2405-
printf(_(" -n, --noclean do not clean up after errors\n"));
2406-
printf(_(" -N, --nosync do not wait for changes to be written safely to disk\n"));
2405+
printf(_(" -n, --no-clean do not clean up after errors\n"));
2406+
printf(_(" -N, --no-sync do not wait for changes to be written safely to disk\n"));
24072407
printf(_(" -s, --show show internal settings\n"));
24082408
printf(_(" -S, --sync-only only sync data directory\n"));
24092409
printf(_("\nOther options:\n"));
@@ -3078,8 +3078,10 @@ main(int argc, char *argv[])
30783078
{"version",no_argument,NULL,'V'},
30793079
{"debug",no_argument,NULL,'d'},
30803080
{"show",no_argument,NULL,'s'},
3081-
{"noclean",no_argument,NULL,'n'},
3082-
{"nosync",no_argument,NULL,'N'},
3081+
{"noclean",no_argument,NULL,'n'},/* for backwards compatibility */
3082+
{"no-clean",no_argument,NULL,'n'},
3083+
{"nosync",no_argument,NULL,'N'},/* for backwards compatibility */
3084+
{"no-sync",no_argument,NULL,'N'},
30833085
{"sync-only",no_argument,NULL,'S'},
30843086
{"xlogdir",required_argument,NULL,'X'},
30853087
{"data-checksums",no_argument,NULL,'k'},
@@ -3165,7 +3167,7 @@ main(int argc, char *argv[])
31653167
break;
31663168
case'n':
31673169
noclean= true;
3168-
printf(_("Running innoclean mode. Mistakes will not be cleaned up.\n"));
3170+
printf(_("Running inno-clean mode. Mistakes will not be cleaned up.\n"));
31693171
break;
31703172
case'N':
31713173
do_sync= false;

‎src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ usage(void)
329329
printf(_(" -c, --checkpoint=fast|spread\n"
330330
" set fast or spread checkpointing\n"));
331331
printf(_(" -l, --label=LABEL set backup label\n"));
332-
printf(_(" -n, --noclean do not clean up after errors\n"));
333-
printf(_(" -N, --nosync do not wait for changes to be written safely to disk\n"));
332+
printf(_(" -n, --no-clean do not clean up after errors\n"));
333+
printf(_(" -N, --no-sync do not wait for changes to be written safely to disk\n"));
334334
printf(_(" -P, --progress show progress information\n"));
335335
printf(_(" -v, --verbose output verbose messages\n"));
336336
printf(_(" -V, --version output version information, then exit\n"));
@@ -2006,8 +2006,8 @@ main(int argc, char **argv)
20062006
{"gzip",no_argument,NULL,'z'},
20072007
{"compress",required_argument,NULL,'Z'},
20082008
{"label",required_argument,NULL,'l'},
2009-
{"noclean",no_argument,NULL,'n'},
2010-
{"nosync",no_argument,NULL,'N'},
2009+
{"no-clean",no_argument,NULL,'n'},
2010+
{"no-sync",no_argument,NULL,'N'},
20112011
{"dbname",required_argument,NULL,'d'},
20122012
{"host",required_argument,NULL,'h'},
20132013
{"port",required_argument,NULL,'p'},

‎src/bin/pg_basebackup/t/010_pg_basebackup.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
$node->command_fails(
4646
['pg_basebackup','-D',"$tempdir/backup",'-n' ],
47-
'failing run withnoclean option');
47+
'failing run withno-clean option');
4848

4949
ok(-d"$tempdir/backup",'backup directory was created and left behind');
5050

‎src/test/perl/PostgresNode.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ sub backup
484484

485485
print"# Taking pg_basebackup$backup_name from node\"$name\"\n";
486486
TestLib::system_or_bail('pg_basebackup','-D',$backup_path,'-p',$port,
487-
'-x','--nosync');
487+
'-x','--no-sync');
488488
print"# Backup finished\n";
489489
}
490490

‎src/test/regress/pg_regress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2239,7 +2239,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
22392239
/* initdb */
22402240
header(_("initializing database system"));
22412241
snprintf(buf,sizeof(buf),
2242-
"\"%s%sinitdb\" -D \"%s/data\" --noclean --nosync%s%s > \"%s/log/initdb.log\" 2>&1",
2242+
"\"%s%sinitdb\" -D \"%s/data\" --no-clean --no-sync%s%s > \"%s/log/initdb.log\" 2>&1",
22432243
bindir ?bindir :"",
22442244
bindir ?"/" :"",
22452245
temp_instance,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp