From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful |
Date: | 2015-05-25 16:05:47 |
Message-ID: | 9915.1432569947@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Greg Stark <stark(at)mit(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2015-05-25 16:06:26 | Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful |
Previous Message | Andres Freund | 2015-05-25 15:55:42 | Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2015-05-25 16:06:26 | Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful |
Previous Message | Andres Freund | 2015-05-25 15:55:42 | Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful |