On Linux, <literal>syncfs</literal> may be used instead, to ask the
operating system to synchronize the file systems that contain the
data directory, the WAL files and each tablespace (but not any other
- file systems that may be reachable through symbolic links). See
- <xref linkend="syncfs"/> for more information about using
- <function>syncfs()</function>.
+ file systems that may be reachable through symbolic links). This may
+ be a lot faster than the <literal>fsync</literal> setting, because it
+ doesn't need to open each file one by one. On the other hand, it may
+ be slower if a file system is shared by other applications that
+ modify a lot of files, since those files will also be written to disk.
+ Furthermore, on versions of Linux before 5.8, I/O errors encountered
+ while writing data to disk may not be reported to
+ <productname>PostgreSQL</productname>, and relevant error messages may
+ appear only in kernel logs.
</para>
<para>
This parameter can only be set in the
<!ENTITY acronyms SYSTEM "acronyms.sgml">
<!ENTITY glossary SYSTEM "glossary.sgml">
<!ENTITY color SYSTEM "color.sgml">
-<!ENTITY syncfs SYSTEM "syncfs.sgml">
<!ENTITY features-supported SYSTEM "features-supported.sgml">
<!ENTITY features-unsupported SYSTEM "features-unsupported.sgml">
&acronyms;
&glossary;
&color;
- &syncfs;
&obsolete;
</part>
On Linux, <literal>syncfs</literal> may be used instead to ask the
operating system to synchronize the whole file systems that contain the
data directory, the WAL files, and each tablespace. See
- <xref linkend="syncfs"/> for more information about using
- <function>syncfs()</function>.
+ <xref linkend="guc-recovery-init-sync-method"/> for information about
+ the caveats to be aware of when using <literal>syncfs</literal>.
</para>
<para>
This option has no effect when <option>--no-sync</option> is used.
backup directory. When the plain format is used,
<command>pg_basebackup</command> will also synchronize the file systems
that contain the WAL files and each tablespace. See
- <xref linkend="syncfs"/> for more information about using
- <function>syncfs()</function>.
+ <xref linkend="guc-recovery-init-sync-method"/> for information about
+ the caveats to be aware of when using <literal>syncfs</literal>.
</para>
<para>
This option has no effect when <option>--no-sync</option> is used.
On Linux, <literal>syncfs</literal> may be used instead to ask the
operating system to synchronize the whole file systems that contain the
data directory, the WAL files, and each tablespace. See
- <xref linkend="syncfs"/> for more information about using
- <function>syncfs()</function>.
+ <xref linkend="guc-recovery-init-sync-method"/> for information about
+ the caveats to be aware of when using <literal>syncfs</literal>.
</para>
<para>
This option has no effect when <option>--no-sync</option> is used.
backup directory. When the plain format is used,
<command>pg_combinebackup</command> will also synchronize the file systems
that contain the WAL files and each tablespace. See
- <xref linkend="syncfs"/> for more information about using
- <function>syncfs()</function>.
+ <xref linkend="guc-recovery-init-sync-method"/> for information about
+ the 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>
On Linux, <literal>syncfs</literal> may be used instead to ask the
operating system to synchronize the whole file system that contains the
- archive directory. See <xref linkend="syncfs"/> for more information
- about using <function>syncfs()</function>.
+ archive directory. See <xref linkend="guc-recovery-init-sync-method"/>
+ for information about the caveats to be aware of when using
+ <literal>syncfs</literal>.
</para>
<para>
This option has no effect when <option>--no-sync</option> is used or
On Linux, <literal>syncfs</literal> may be used instead to ask the
operating system to synchronize the whole file systems that contain the
data directory, the WAL files, and each tablespace. See
- <xref linkend="syncfs"/> for more information about using
- <function>syncfs()</function>.
+ <xref linkend="guc-recovery-init-sync-method"/> for information about
+ the caveats to be aware of when using <literal>syncfs</literal>.
</para>
<para>
This option has no effect when <option>--no-sync</option> is used.
On Linux, <literal>syncfs</literal> may be used instead to ask the
operating system to synchronize the whole file systems that contain the
upgraded cluster's data directory, its WAL files, and each tablespace.
- See <xref linkend="syncfs"/> for more information about using
- <function>syncfs()</function>.
+ See <xref linkend="guc-recovery-init-sync-method"/> for information
+ about the caveats to be aware of when using <literal>syncfs</literal>.
</para>
<para>
This option has no effect when <option>--no-sync</option> is used.
+++ /dev/null
-<!-- doc/src/sgml/syncfs.sgml -->
-
-<appendix id="syncfs">
- <title><function>syncfs()</function> Caveats</title>
-
- <indexterm zone="syncfs">
- <primary>syncfs</primary>
- </indexterm>
-
- <para>
- On Linux <function>syncfs()</function> may be specified for some
- configuration parameters (e.g.,
- <xref linkend="guc-recovery-init-sync-method"/>), server applications (e.g.,
- <application>pg_upgrade</application>), and client applications (e.g.,
- <application>pg_basebackup</application>) that involve synchronizing many
- files to disk. <function>syncfs()</function> is advantageous in many cases,
- but there are some trade-offs to keep in mind.
- </para>
-
- <para>
- Since <function>syncfs()</function> instructs the operating system to
- synchronize a whole file system, it typically requires many fewer system
- calls than using <function>fsync()</function> to synchronize each file one by
- one. Therefore, using <function>syncfs()</function> may be a lot faster than
- using <function>fsync()</function>. However, it may be slower if a file
- system is shared by other applications that modify a lot of files, since
- those files will also be written to disk.
- </para>
-
- <para>
- Furthermore, on versions of Linux before 5.8, I/O errors encountered while
- writing data to disk may not be reported to the calling program, and relevant
- error messages may appear only in kernel logs.
- </para>
-
-</appendix>