aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2024-03-27 10:23:13 -0500
committerNathan Bossart <nathan@postgresql.org>2024-03-27 10:23:13 -0500
commit44a4cca9913bae8557c31207adb97b94e6e60603 (patch)
treef5c659b448aecc5b4631bb73d09c5962d1c21416 /doc/src
parentde7e96bd0fc620715fa1c7bd9985463c358664cf (diff)
downloadpostgresql-44a4cca9913bae8557c31207adb97b94e6e60603.tar.gz
postgresql-44a4cca9913bae8557c31207adb97b94e6e60603.zip
Adjust documentation for syncfs().
Commit 8c16ad3b43 created a new appendix for syncfs(), which is excessive for such a small amount of content. This commit moves the description of the caveats to be aware of when using syncfs() back to the documentation for recovery_init_sync_method. The documentation for the other utilities with syncfs() support now directs readers to recovery_init_sync_method for information about these caveats. Reported-by: Peter Eisentraut, Robert Haas Suggested-by: Robert Haas Reviewed-by: Robert Haas Discussion: https://postgr.es/m/42804669-7063-1320-ed37-3226d5f1067d%40eisentraut.org Discussion: https://postgr.es/m/CA%2BTgmobUiqKr%2BZMCLc5Qap-sXBnjfGUU%2BZBmzYEjUuWyjsGr1g%40mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml12
-rw-r--r--doc/src/sgml/filelist.sgml1
-rw-r--r--doc/src/sgml/postgres.sgml1
-rw-r--r--doc/src/sgml/ref/initdb.sgml4
-rw-r--r--doc/src/sgml/ref/pg_basebackup.sgml4
-rw-r--r--doc/src/sgml/ref/pg_checksums.sgml4
-rw-r--r--doc/src/sgml/ref/pg_combinebackup.sgml4
-rw-r--r--doc/src/sgml/ref/pg_dump.sgml5
-rw-r--r--doc/src/sgml/ref/pg_rewind.sgml4
-rw-r--r--doc/src/sgml/ref/pgupgrade.sgml4
-rw-r--r--doc/src/sgml/syncfs.sgml36
11 files changed, 24 insertions, 55 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 65a6e6c4086..5468637e2ef 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -10870,9 +10870,15 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
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
diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml
index e0dca81cb2e..c92a16c7ac7 100644
--- a/doc/src/sgml/filelist.sgml
+++ b/doc/src/sgml/filelist.sgml
@@ -182,7 +182,6 @@
<!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">
diff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgml
index 2c107199d30..381af69be28 100644
--- a/doc/src/sgml/postgres.sgml
+++ b/doc/src/sgml/postgres.sgml
@@ -289,7 +289,6 @@ break is not needed in a wider output rendering.
&acronyms;
&glossary;
&color;
- &syncfs;
&obsolete;
</part>
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index 377c3cb20aa..dc9011b40ed 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -394,8 +394,8 @@ PostgreSQL documentation
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.
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index 208530f393a..82d0c8e0088 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -642,8 +642,8 @@ PostgreSQL documentation
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.
diff --git a/doc/src/sgml/ref/pg_checksums.sgml b/doc/src/sgml/ref/pg_checksums.sgml
index db5b29505cd..95043aa329c 100644
--- a/doc/src/sgml/ref/pg_checksums.sgml
+++ b/doc/src/sgml/ref/pg_checksums.sgml
@@ -152,8 +152,8 @@ PostgreSQL documentation
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.
diff --git a/doc/src/sgml/ref/pg_combinebackup.sgml b/doc/src/sgml/ref/pg_combinebackup.sgml
index 8a0a600c2b2..6f90dba281f 100644
--- a/doc/src/sgml/ref/pg_combinebackup.sgml
+++ b/doc/src/sgml/ref/pg_combinebackup.sgml
@@ -176,8 +176,8 @@ PostgreSQL documentation
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.
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 8edf03a03df..b99793e4148 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1319,8 +1319,9 @@ PostgreSQL documentation
<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
diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml
index 841bd49fc74..dc039d87566 100644
--- a/doc/src/sgml/ref/pg_rewind.sgml
+++ b/doc/src/sgml/ref/pg_rewind.sgml
@@ -297,8 +297,8 @@ PostgreSQL documentation
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.
diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 8de52bf7527..80a50377b1d 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -204,8 +204,8 @@ PostgreSQL documentation
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.
diff --git a/doc/src/sgml/syncfs.sgml b/doc/src/sgml/syncfs.sgml
deleted file mode 100644
index 00457d24579..00000000000
--- a/doc/src/sgml/syncfs.sgml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!-- 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>