caveats to be aware of when using <literal>syncfs</literal>.
</para>
<para>
This option has no effect when <option>--no-sync</option> is used.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-initdb-option-sync-only">
<term><option>-S</option></term>
<term><option>--sync-only</option></term>
<listitem>
<para>
Safely write all database files to disk and exit. This does not
perform any of the normal <application>initdb</application> operations.
Generally, this option is useful for ensuring reliable recovery after
changing <xref linkend="guc-fsync"/> from <literal>off</literal> to
<literal>on</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Other options:
<variablelist>
<varlistentry id="app-initdb-option-version">
<term><option>-V</option></term>
<term><option>--version</option></term>
<listitem>
<para>
Print the <application>initdb</application> version and exit.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-initdb-option-help">
<term><option>-?</option></term>
<term><option>--help</option></term>
<listitem>
<para>
Show help about <application>initdb</application> command line
arguments, and exit.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
<title>Environment</title>
<variablelist>
<varlistentry id="app-initdb-environment-pgdata">
<term><envar>PGDATA</envar></term>
<listitem>
<para>
Specifies the directory where the database cluster is to be
stored; can be overridden using the <option>-D</option> option.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-initdb-environment-pg-color">
<term><envar>PG_COLOR</envar></term>
<listitem>
<para>
Specifies whether to use color in diagnostic messages. Possible values
are <literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-initdb-environment-tz">
<term><envar>TZ</envar></term>
<listitem>
<para>
Specifies the default time zone of the created database cluster. The
value should be a full time zone name
(see <xref linkend="datatype-timezones"/>).
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Notes</title>
<para>
<command>initdb</command> can also be invoked via
<command>pg_ctl initdb</command>.
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<simplelist type="inline">
<member><xref linkend="app-pg-ctl"/></member>
<member><xref linkend="app-postgres"/></member>
<member><xref linkend="auth-pg-hba-conf"/></member>
</simplelist>
</refsect1>
</refentry>