Re: pgsql: Adjust initdb to also not consider fsync'ing failures fatal.

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Adjust initdb to also not consider fsync'ing failures fatal.
Date: 2015-05-30 02:14:52
Message-ID: 55691D1C.2050905@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 5/29/15 4:06 PM, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)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.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2015-05-31 11:12:57 pgsql: Make Python tests more portable
Previous Message Andres Freund 2015-05-29 21:49:27 Re: pgsql: Remove special cases for ETXTBSY from new fsync'ing logic.