From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix failure to check for open() or fsync() failures. |
Date: | 2018-12-26 21:08:23 |
Message-ID: | E1gcGPf-0000Ih-1f@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Fix failure to check for open() or fsync() failures.
While it seems OK to not be concerned about fsync() failure for a
pre-existing signal file, it's not OK to not even check for open()
failure. This at least causes complaints from static analyzers,
and I think on some platforms passing -1 to fsync() or close() might
trigger assertion-type failures. Also add (void) casts to make clear
that we're ignoring fsync's result intentionally.
Oversights in commit 2dedf4d9a, noted by Coverity.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8528e3d849a896f8711c56fb41eae56f8c986729
Modified Files
--------------
src/backend/access/transam/xlog.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-12-26 22:43:51 | Re: pgsql: Fix failure to check for open() or fsync() failures. |
Previous Message | Tom Lane | 2018-12-26 20:30:58 | pgsql: Fix portability failure introduced in commits d2b0b60e7 et al. |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2018-12-26 21:10:30 | Re: Feature: temporary materialized views |
Previous Message | Peter Geoghegan | 2018-12-26 20:27:50 | Re: random() (was Re: New GUC to sample log queries) |