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
On Linux, syncfs 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
- for more information about using
- syncfs() .
+ file systems that may be reachable through symbolic links). This may
+ be a lot faster than the fsync 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
+
PostgreSQL , and relevant error messages may
+ appear only in kernel logs.
This parameter can only be set in the
&acronyms;
&glossary;
&color;
- &syncfs;
&obsolete;
On Linux, syncfs 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
- syncfs"/> for more information about using
- syncfs() >.
+ guc-recovery-init-sync-method"/> for information about
+ the caveats to be aware of when using syncfs >.
This option has no effect when --no-sync is used.
backup directory. When the plain format is used,
pg_basebackup will also synchronize the file systems
that contain the WAL files and each tablespace. See
- syncfs"/> for more information about using
- syncfs() >.
+ guc-recovery-init-sync-method"/> for information about
+ the caveats to be aware of when using syncfs >.
This option has no effect when --no-sync is used.
On Linux, syncfs 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
- syncfs"/> for more information about using
- syncfs() >.
+ guc-recovery-init-sync-method"/> for information about
+ the caveats to be aware of when using syncfs >.
This option has no effect when --no-sync is used.
backup directory. When the plain format is used,
pg_combinebackup will also synchronize the file systems
that contain the WAL files and each tablespace. See
- syncfs"/> for more information about using
- syncfs() >.
+ guc-recovery-init-sync-method"/> for information about
+ the caveats to be aware of when using syncfs >.
This option has no effect when --no-sync is used.
On Linux, syncfs may be used instead to ask the
operating system to synchronize the whole file system that contains the
- archive directory. See for more information
- about using syncfs() .
+ archive directory. See
+ for information about the caveats to be aware of when using
+ syncfs .
This option has no effect when --no-sync is used or
On Linux, syncfs 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
- syncfs"/> for more information about using
- syncfs() >.
+ guc-recovery-init-sync-method"/> for information about
+ the caveats to be aware of when using syncfs >.
This option has no effect when --no-sync is used.
On Linux, syncfs 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 syncfs"/> for more information about using
- syncfs() >.
+ See guc-recovery-init-sync-method"/> for information
+ about the caveats to be aware of when using syncfs >.
This option has no effect when --no-sync is used.
+++ /dev/null
-
-
-
syncfs() Caveats
-
-
-
-
- On Linux syncfs() may be specified for some
- configuration parameters (e.g.,
- ), server applications (e.g.,
-
pg_upgrade ), and client applications (e.g.,
-
pg_basebackup ) that involve synchronizing many
- files to disk. syncfs() is advantageous in many cases,
- but there are some trade-offs to keep in mind.
-
-
- Since syncfs() instructs the operating system to
- synchronize a whole file system, it typically requires many fewer system
- calls than using fsync() to synchronize each file one by
- one. Therefore, using syncfs() may be a lot faster than
- using fsync() . 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.
-
-
- 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.
-
-
-