From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix failure to check for open() or fsync() failures.
Date: Wed, 26 Dec 2018 21:08:23 +0000
Message-ID: <E1gcGPf-0000Ih-1f@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix failure to check for open() or fsync() failures.
In-Reply-To: <E1gcGPf-0000Ih-1f@gemulon.postgresql.org>
References: <E1gcGPf-0000Ih-1f@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox