Skip to content

Commit bde2eec

Browse files
committed
doc: Improve order of options on initdb reference page
Both the initdb --help output and the reference page have a section for options and a section for less commonly used options. But some recently added options were sprinkled around inconsistently. Fix that by making the documentation match the --help output.
1 parent 597f669 commit bde2eec

File tree

1 file changed

+64
-64
lines changed

1 file changed

+64
-64
lines changed

doc/src/sgml/ref/initdb.sgml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -343,34 +343,6 @@ PostgreSQL documentation
343343
</listitem>
344344
</varlistentry>
345345

346-
<varlistentry id="app-initdb-option-no-sync">
347-
<term><option>-N</option></term>
348-
<term><option>--no-sync</option></term>
349-
<listitem>
350-
<para>
351-
By default, <command>initdb</command> will wait for all files to be
352-
written safely to disk. This option causes <command>initdb</command>
353-
to return without waiting, which is faster, but means that a
354-
subsequent operating system crash can leave the data directory
355-
corrupt. Generally, this option is useful for testing, but should not
356-
be used when creating a production installation.
357-
</para>
358-
</listitem>
359-
</varlistentry>
360-
361-
<varlistentry id="app-initdb-option-no-instructions">
362-
<term><option>--no-instructions</option></term>
363-
<listitem>
364-
<para>
365-
By default, <command>initdb</command> will write instructions for how
366-
to start the cluster at the end of its output. This option causes
367-
those instructions to be left out. This is primarily intended for use
368-
by tools that wrap <command>initdb</command> in platform-specific
369-
behavior, where those instructions are likely to be incorrect.
370-
</para>
371-
</listitem>
372-
</varlistentry>
373-
374346
<varlistentry id="app-initdb-option-pwfile">
375347
<term><option>--pwfile=<replaceable>filename</replaceable></option></term>
376348
<listitem>
@@ -381,42 +353,6 @@ PostgreSQL documentation
381353
</listitem>
382354
</varlistentry>
383355

384-
<varlistentry id="app-initdb-option-sync-method">
385-
<term><option>--sync-method=<replaceable>method</replaceable></option></term>
386-
<listitem>
387-
<para>
388-
When set to <literal>fsync</literal>, which is the default,
389-
<command>initdb</command> will recursively open and synchronize all
390-
files in the data directory. The search for files will follow symbolic
391-
links for the WAL directory and each configured tablespace.
392-
</para>
393-
<para>
394-
On Linux, <literal>syncfs</literal> may be used instead to ask the
395-
operating system to synchronize the whole file systems that contain the
396-
data directory, the WAL files, and each tablespace. See
397-
<xref linkend="guc-recovery-init-sync-method"/> for information about
398-
the caveats to be aware of when using <literal>syncfs</literal>.
399-
</para>
400-
<para>
401-
This option has no effect when <option>--no-sync</option> is used.
402-
</para>
403-
</listitem>
404-
</varlistentry>
405-
406-
<varlistentry id="app-initdb-option-sync-only">
407-
<term><option>-S</option></term>
408-
<term><option>--sync-only</option></term>
409-
<listitem>
410-
<para>
411-
Safely write all database files to disk and exit. This does not
412-
perform any of the normal <application>initdb</application> operations.
413-
Generally, this option is useful for ensuring reliable recovery after
414-
changing <xref linkend="guc-fsync"/> from <literal>off</literal> to
415-
<literal>on</literal>.
416-
</para>
417-
</listitem>
418-
</varlistentry>
419-
420356
<varlistentry id="app-initdb-option-text-search-config">
421357
<term><option>-T <replaceable>config</replaceable></option></term>
422358
<term><option>--text-search-config=<replaceable>config</replaceable></option></term>
@@ -560,6 +496,70 @@ PostgreSQL documentation
560496
</para>
561497
</listitem>
562498
</varlistentry>
499+
500+
<varlistentry id="app-initdb-option-no-sync">
501+
<term><option>-N</option></term>
502+
<term><option>--no-sync</option></term>
503+
<listitem>
504+
<para>
505+
By default, <command>initdb</command> will wait for all files to be
506+
written safely to disk. This option causes <command>initdb</command>
507+
to return without waiting, which is faster, but means that a
508+
subsequent operating system crash can leave the data directory
509+
corrupt. Generally, this option is useful for testing, but should not
510+
be used when creating a production installation.
511+
</para>
512+
</listitem>
513+
</varlistentry>
514+
515+
<varlistentry id="app-initdb-option-no-instructions">
516+
<term><option>--no-instructions</option></term>
517+
<listitem>
518+
<para>
519+
By default, <command>initdb</command> will write instructions for how
520+
to start the cluster at the end of its output. This option causes
521+
those instructions to be left out. This is primarily intended for use
522+
by tools that wrap <command>initdb</command> in platform-specific
523+
behavior, where those instructions are likely to be incorrect.
524+
</para>
525+
</listitem>
526+
</varlistentry>
527+
528+
<varlistentry id="app-initdb-option-sync-method">
529+
<term><option>--sync-method=<replaceable>method</replaceable></option></term>
530+
<listitem>
531+
<para>
532+
When set to <literal>fsync</literal>, which is the default,
533+
<command>initdb</command> will recursively open and synchronize all
534+
files in the data directory. The search for files will follow symbolic
535+
links for the WAL directory and each configured tablespace.
536+
</para>
537+
<para>
538+
On Linux, <literal>syncfs</literal> may be used instead to ask the
539+
operating system to synchronize the whole file systems that contain the
540+
data directory, the WAL files, and each tablespace. See
541+
<xref linkend="guc-recovery-init-sync-method"/> for information about
542+
the caveats to be aware of when using <literal>syncfs</literal>.
543+
</para>
544+
<para>
545+
This option has no effect when <option>--no-sync</option> is used.
546+
</para>
547+
</listitem>
548+
</varlistentry>
549+
550+
<varlistentry id="app-initdb-option-sync-only">
551+
<term><option>-S</option></term>
552+
<term><option>--sync-only</option></term>
553+
<listitem>
554+
<para>
555+
Safely write all database files to disk and exit. This does not
556+
perform any of the normal <application>initdb</application> operations.
557+
Generally, this option is useful for ensuring reliable recovery after
558+
changing <xref linkend="guc-fsync"/> from <literal>off</literal> to
559+
<literal>on</literal>.
560+
</para>
561+
</listitem>
562+
</varlistentry>
563563
</variablelist>
564564
</para>
565565

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy