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

2010-01-10 Thread Michael Felt
Update: I have reinstalled my server and now it works fine. (I did not recomply the initdb program). As I did this to enable a security feature, not related to this (called Trusted Executition) I can only guess what might have been to problem. As I dont have the old system - and I am not going to r

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

2010-01-07 Thread Tom Lane
Robert Haas writes: > On Thu, Jan 7, 2010 at 11:39 AM, Tom Lane wrote: >> 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,

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

2010-01-07 Thread Robert Haas
On Thu, Jan 7, 2010 at 11:39 AM, Tom Lane wrote: > Robert Haas 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 i

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

2010-01-07 Thread Tom Lane
Michael Felt writes: > I ran my test program with larger and smaller MAXPGPATH constants. 2046 > (1023 * 2) was the largest I tested and it worked fine. When it was shorted > the call failed. I did not test the error message. [ scratches head... ] This seems to be misbehavior of getcwd() itself,

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

2010-01-07 Thread Tom Lane
Robert Haas 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 > co

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

2010-01-07 Thread Michael Felt
I turned on audit - it continues to say michael as user for accountability. Notice: su changes to /home/postgres and initdb changes to /usr/local/pgsql/bin FS_Chdirmichael OK Thu Jan 07 16:06:35 2010 su Global change current directory to: /hom

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

2010-01-07 Thread Michael Felt
I wrote a simple program - just calling getcwd() and I added some extra text to exec.c - to know where it is at. You should recognize it. mich...@x054:[/data/home/michael]ls -l /usr/local/pgsql/bin/mytest -rwx--1 root system 4793 Jan 07 15:39 /usr/local/pgsql/bin/mytest mich...

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

2010-01-07 Thread Robert Haas
On Thu, Jan 7, 2010 at 10:00 AM, Michael Felt wrote: > mich...@x054:[/data/prj/postgresql-8.4.2/src]grep cwd */*.c > Well, unless you redefine it... > port/exec.c:#define getcwd(cwd,len) GetCurrentDirectory(len, cwd) If you look at the context of this #define you'll see that it only applies to W

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

2010-01-07 Thread Michael Felt
mich...@x054:[/data/prj/postgresql-8.4.2/src]grep cwd */*.c Well, unless you redefine it... port/exec.c:#define getcwd(cwd,len) GetCurrentDirectory(len, cwd) port/exec.c:charcwd[MAXPGPATH], port/exec.c:if (!getcwd(cwd, MAXPGPATH)) port/exec.c:join_path_compo

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

2010-01-07 Thread Tom Lane
Michael Felt writes: > On Thu, Jan 7, 2010 at 3:35 PM, Tom Lane wrote: >> Well, the problem is what to print? The failure we are trying to report >> is exactly that we *can't get* the name of the directory. > Well, there is an argument that a system call is using to get somewhere? getcwd() has

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

2010-01-07 Thread Michael Felt
Well, there is an argument that a system call is using to get somewhere? Even if it is a number, it is something. I could do an ncheck or whatever to at least find what it is calling. As I am not at all familiar with the code - just give me source to debug, and I'll work from that. On Thu, Jan 7,

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

2010-01-07 Thread Tom Lane
Michael Felt writes: > I suppose I could turn on audit and see if it is trying to access a hard > coded directory. But, in any case, I would update the error message to at > least mention the directory name it is having issues with. Well, the problem is what to print? The failure we are trying t

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

2010-01-07 Thread Michael Felt
mich...@x054:[/data/home/ michael]ls -ld / drwxr-xr-x 27 root system 4096 Jan 04 17:20 / mich...@x054:[/data/home/michael]ls -ld /usr drwxr-xr-x 43 root system 4096 Jan 05 13:40 /usr mich...@x054:[/data/home/michael]ls -ld /usr/local drwxr-xr-x 19 root system

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

2010-01-06 Thread Tom Lane
"Michael Felt" writes: > I have compiled postgresql on AIX 6.1 without a great deal of difficulity > (./configure -without-readline -without-zlib). > However, the fist step - initdb - fails. I have not been able to determine > which directory it is complaining about. > could not identify current

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

2010-01-06 Thread Alvaro Herrera
Michael Felt escribió: > > The following bug has been logged online: > > Bug reference: 5267 > Logged by: Michael Felt > Email address: mamf...@gmail.com > PostgreSQL version: 8.4.2 > Operating system: AIX > Description:initdb fails on AIX: could not identify current

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

2010-01-06 Thread Michael Felt
Michael Felt wrote: The following bug has been logged online: Bug reference: 5267 Logged by: Michael Felt Email address: mamf...@gmail.com PostgreSQL version: 8.4.2 Operating system: AIX Description:initdb fails on AIX: could not identify current directory Details:

[BUGS] BUG #5267: initdb fails on AIX: could not identify current directory

2010-01-06 Thread Michael Felt
The following bug has been logged online: Bug reference: 5267 Logged by: Michael Felt Email address: mamf...@gmail.com PostgreSQL version: 8.4.2 Operating system: AIX Description:initdb fails on AIX: could not identify current directory Details: I have compiled post