Change client-side fsync_fname() to report errors fatally Given all we have learned about fsync() error handling in the last few years, reporting an fsync() error non-fatally is not useful, unless you don't care much about the file, in which case you probably don't need to use fsync() in the first place.
Change fsync_fname() and durable_rename() to exit(1) on fsync() errors other than those that we specifically chose to ignore. This affects initdb, pg_basebackup, pg_checksums, pg_dump, pg_dumpall, and pg_rewind. Reviewed-by: Michael Paquier <mich...@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/d239d1bd-aef0-ca7c-dc0a-da14bdcf0392%402ndquadrant.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1420617b14e2e3722367b826986a50ea33ff62ec Modified Files -------------- src/common/file_utils.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)