From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Change client-side fsync_fname() to report errors fatally |
Date: | 2020-02-24 16:02:38 |
Message-ID: | E1j6GBq-000222-MD@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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 <michael(at)paquier(dot)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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-02-24 16:59:28 | Re: pgsql: Allow running src/tools/msvc/mkvcbuild.pl under not Windows |
Previous Message | Tom Lane | 2020-02-24 14:44:29 | Re: pgsql: Add kqueue(2) support to the WaitEventSet API. |