From: | Nathan Bossart <nathan(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add support for syncfs() in frontend support functions. |
Date: | 2023-09-06 23:28:00 |
Message-ID: | E1qe1wG-002jjq-FT@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add support for syncfs() in frontend support functions.
This commit adds support for using syncfs() in fsync_pgdata() and
fsync_dir_recurse() (which have been renamed to sync_pgdata() and
sync_dir_recurse()). Like recovery_init_sync_method,
sync_pgdata() calls syncfs() for the data directory, each
tablespace, and pg_wal (if it is a symlink). For now, all of the
frontend utilities that use these support functions are hard-coded
to use fsync(), but a follow-up commit will allow specifying
syncfs().
Co-authored-by: Justin Pryzby
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/20210930004340.GM831%40telsasoft.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cccc6cdeb32f010f1cf777a9e9a85344a4317ab8
Modified Files
--------------
src/bin/initdb/initdb.c | 7 +-
src/bin/pg_basebackup/pg_basebackup.c | 5 +-
src/bin/pg_checksums/pg_checksums.c | 3 +-
src/bin/pg_dump/pg_backup.h | 4 +-
src/bin/pg_dump/pg_backup_archiver.c | 14 ++-
src/bin/pg_dump/pg_backup_archiver.h | 1 +
src/bin/pg_dump/pg_backup_directory.c | 2 +-
src/bin/pg_dump/pg_dump.c | 3 +-
src/bin/pg_rewind/file_ops.c | 8 +-
src/bin/pg_rewind/pg_rewind.c | 1 +
src/bin/pg_rewind/pg_rewind.h | 2 +
src/common/file_utils.c | 191 +++++++++++++++++++++++++++-------
src/include/common/file_utils.h | 5 +-
13 files changed, 190 insertions(+), 56 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2023-09-06 23:50:27 | pgsql: Disable 031_recovery_conflict.pl in 15 and 16. |
Previous Message | Bruce Momjian | 2023-09-06 20:52:52 | pgsql: doc: mention that to_char() values are rounded |