On 5/29/15 4:06 PM, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
>> On 5/29/15 1:05 PM, Tom Lane wrote:
>>> Adjust initdb to also not consider fsync'ing failures fatal.
>
>> This introduces a failure in the initdb tests, which expect that
>> initdb -S -D /notthere
>> returns a nonzero exit code.
>
> Hm, I guess we don't run anything else that touches the DB directory
> in this case? In the backend case we'd have failed much earlier.
Yeah, in the backend, there are various checks earlier that the data
directory exists.
> I'm not 100% convinced that the test case's expectation is necessarily
> the right thing, though.
Well, I think a tool
do_something DIRECTORY
that just prints out error messages and says "ok" without an error code
when the directory doesn't exist is a pretty crappy behavior.
The premise of this change was that we don't know what all the files in
the data directory might be, but we do know what the top-level directory
is, so we should treat that properly.