Re: BUG #5267: initdb fails on AIX: could not identify current directory - Mailing list pgsql-bugs

From Robert Haas
Subject Re: BUG #5267: initdb fails on AIX: could not identify current directory
Date
Msg-id 603c8f071001071004u12ff852cvd4ad1fd12ced66ee@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5267: initdb fails on AIX: could not identify current directory  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5267: initdb fails on AIX: could not identify current directory  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Thu, Jan 7, 2010 at 11:39 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I have to say that the error message that is produced by the above
>> test case could easily send one looking in the wrong direction, and
>> could perhaps stand to be improved. =A0Could we just do getcwd() once,
>> bail out if it fails, and then stash the results, rather than
>> continuing on and eventually producing a misleading error message?
>
> How does that help? =A0We still can't print the directory name.

Well, as it is, it looks like the failure of getcwd() might be an
incidental problem, and the inability to find postgres was what sunk
the ship.  In fact, the inability to find postgres is an entirely
illusory problem created by the failure of getcwd().  If you just got
one error message saying "getcwd failed", I think it would be more
clear what the problem was.  I had to go read the code to figure out
that the failure of getcwd() would result in a guaranteed failure to
find the postgres executable.

...Robert

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5268: PQgetvalue incorrectly returns 0
Next
From: Robert Haas
Date:
Subject: Re: BUG #5098: Levenshtein with costs is broken