Re: BUG #5267: initdb fails on AIX: could not identify current directory

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Felt <mamfelt(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5267: initdb fails on AIX: could not identify current directory
Date: 2010-01-07 18:04:44
Message-ID: 603c8f071001071004u12ff852cvd4ad1fd12ced66ee@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jan 7, 2010 at 11:39 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)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.  Could 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?  We 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2010-01-07 18:18:08 Re: BUG #5098: Levenshtein with costs is broken
Previous Message Robert Haas 2010-01-07 18:01:47 Re: BUG #5268: PQgetvalue incorrectly returns 0