pgsql: Add support for syncfs() in frontend support functions.

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема pgsql: Add support for syncfs() in frontend support functions.
Дата
Msg-id E1qe1wG-002jjq-FT@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: pgsql: doc: mention that to_char() values are rounded
Следующее
От: Thomas Munro
Дата:
Сообщение: pgsql: Disable 031_recovery_conflict.pl in 15 and 16.