Skip to content

Commit ea499f3

Browse files
Clarify initdb --sync-only help message and docs
The initdb help message for --sync-only was a bit terse, and not really self-explanatory. Make it clearer that initdb --sync-only will exit after syncing, and expand the docs with a note on when the option can be useful. Also align the help output with others that exit immediately. Author: Nathan Bossart, Gurjeet Singh Discussion: https://postgr.es/m/CABwTF4U6hbNNE1bv=LxQdJybmUdZ5NJQ9rKY9tN82NXM8QH+iQ@mail.gmail.com
1 parent e4ba100 commit ea499f3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/src/sgml/ref/initdb.sgml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ PostgreSQL documentation
306306
<para>
307307
Safely write all database files to disk and exit. This does not
308308
perform any of the normal <application>initdb</application> operations.
309+
Generally, this option is useful for ensuring reliable recovery after
310+
changing <xref linkend="guc-fsync"/> from <literal>off</literal> to
311+
<literal>on</literal>.
309312
</para>
310313
</listitem>
311314
</varlistentry>

src/bin/initdb/initdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2200,7 +2200,7 @@ usage(const char *progname)
22002200
printf(_(" -N, --no-sync do not wait for changes to be written safely to disk\n"));
22012201
printf(_(" --no-instructions do not print instructions for next steps\n"));
22022202
printf(_(" -s, --show show internal settings\n"));
2203-
printf(_(" -S, --sync-only only sync data directory\n"));
2203+
printf(_(" -S, --sync-only only sync database files to disk, then exit\n"));
22042204
printf(_("\nOther options:\n"));
22052205
printf(_(" -V, --version output version information, then exit\n"));
22062206
printf(_(" -?, --help show this help, then exit\n"));

0 commit comments

Comments
 (0)