From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <stark@mit.edu>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful
Date: Mon, 25 May 2015 12:05:47 -0400
Message-ID: <9915.1432569947@sss.pgh.pa.us> (raw)
In-Reply-To: <CAM-w4HP+0e-CDGhrXDej0OyMFeZFmhG0=PgE8RKi_gyTAi9rPA@mail.gmail.com>
References: <20150525142657.4686.35151@wrigleys.postgresql.org>
<20150525151243.GM26667@tamriel.snowman.net>
<CABUevEx_4cRFYk_21_DvP+03pricHAtjpQ4wpiYTUsxLmvUC-Q@mail.gmail.com>
<CAM-w4HP+0e-CDGhrXDej0OyMFeZFmhG0=PgE8RKi_gyTAi9rPA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Greg Stark <stark@mit.edu> writes:
> What exactly is failing?
> Is it that fsync is returning -1 ?
According to the original report from Christoph Berg, it was open()
not fsync() that was failing, at least in permissions-based cases.
I'm not sure if we should just uniformly ignore all failures in this
phase. That would have the merit of clearly not creating any new
startup failure cases compared to the previous code, but as you say
sometimes it might mean ignoring real problems.
Another idea would be to elog(LOG) such failures but press on anyway.
Lastly, there is a difference between ignoring failures in fsync_fname()
and ignoring failures in walkdir(). The latter is presumably a general
purpose subroutine and so I would expect it to throw errors if it gets a
failure in, say, opendir(). Which it does. But do we want that in this
context? Unreadable directories underneath $PGDATA are probably not a
good thing, but OTOH this would still mean that there's a new startup
failure condition compared to before.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, stark@mit.edu, magnus@hagander.net, sfrost@snowman.net, robertmhaas@gmail.com, andrew@tao11.riddles.org.uk, pgsql-hackers@postgresql.org
Subject: Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful
In-Reply-To: <9915.1432569947@sss.pgh.pa.us>
References: <20150525142657.4686.35151@wrigleys.postgresql.org> <20150525151243.GM26667@tamriel.snowman.net> <CABUevEx_4cRFYk_21_DvP+03pricHAtjpQ4wpiYTUsxLmvUC-Q@mail.gmail.com> <CAM-w4HP+0e-CDGhrXDej0OyMFeZFmhG0=PgE8RKi_gyTAi9rPA@mail.gmail.com> <9915.1432569947@sss.pgh.pa.us>
* 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