From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Christoph Berg <myon(at)debian(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: fsync-pgdata-on-recovery tries to write to more files than previously |
Date: | 2015-05-29 17:14:18 |
Message-ID: | 9975.1432919658@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> writes:
> At 2015-05-28 17:37:16 -0400, tgl(at)sss(dot)pgh(dot)pa(dot)us wrote:
>> I have to leave shortly, so I'll look at the initdb cleanup tomorrow.
> Here's a revision of that patch that's more along the lines of what you
> committed.
Pushed with minor revisions.
> It occurred to me that we should probably also silently skip EACCES on
> opendir and stat/lstat in walkdir. That's what the attached initdb patch
> does. If you think it's a good idea, there's also a small fixup attached
> for the backend version too.
As I mentioned yesterday, I'm not really on board with ignoring EACCES,
except for the directories-on-Windows case. Since we're only logging
the failures anyway, I think it is reasonable to log a complaint for any
unwritable file in the data directory. I've not done it yet, but what
I think we oughta do is revert
if (errno == EACCES || (isdir && errno == EISDIR))
back to the former logic
if (isdir && (errno == EISDIR || errno == EACCES))
and even then, maybe the EACCES exclusion ought to be Windows only?
Also I want to get rid of the ETXTBSY special cases. That one doesn't
seem like something that we should silently ignore: what the heck are
executables doing in the data directory? Or is there some other meaning
on Windows?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2015-05-29 17:15:56 | Need Force flag for pg_drop_replication_slot() |
Previous Message | Jeff Janes | 2015-05-29 16:55:28 | Re: [Proposal] More Vacuum Statistics |