From: | OpenMacNews <pgsql-general(dot)20(dot)openmacnews(at)spamgourmet(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | initdb error: "could not identify current directory" (or, what have i done now?) |
Date: | 2004-12-03 23:27:12 |
Message-ID: | FDD4DFEFBA850989EE8544E8@tiedgar.internal.presence-group.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
hi all,
i just clean-rebuilt pgsql8b5 os OSX 10.3.6
the build went fine as before -- no errors reported.
per instruction, i've created an unpriv'd user: testuser.
now, however, when i try to 'initdb', creating in '/var/data/pgsql':
> su testuser
% /usr/local/pgsql/bin/initdb --pgdata=/var/data/pgsql --username=testuser
--debug
i get the following shell output:
could not identify current directory: Permission denied
Running in debug mode.
could not identify current directory: Permission denied
could not identify current directory: Permission denied
The program "postgres" is needed by initdb but was not found in the
same directory as "initdb".
Check your installation.
checking my pgsql/bin DIR,
% ls -al /usr/local/pgsql/bin
clusterdb droplang pg_config pg_resetxlog postgres
createdb dropuser pg_controldata pg_restore postmaster
createlang ecpg pg_ctl pltcl_delmod psql
createuser initdb pg_dump pltcl_listmod vacuumdb
dropdb ipcclean pg_dumpall pltcl_loadmod
'initdb' and 'postgres' _are_ in the same location.
poking around in the src,
% grep -rln "could not identify current directory" .
./src/port/exec.c
i find:
if (!getcwd(cwd, MAXPGPATH))
{
log_error(_("could not identify current directory: %s"),
strerror(errno));
return -1;
}
which seems to be abt finding absolute paths to executables ... why it
'stopped' working between last nite and this morning, i have no idea.
i also note a comment:
"Finally, we want a true path not a symlink location"
fwiw, the dirs involved are both symlinked
/usr/local/pgsql/bin/initdb <-- ln -s /Volumes/devhd/local/pgsql
/var/data/pgsql <-- ln -s /Volumes/data/pgsql
but that hasn't changed for ages!
there's an old thread abt this:
<http://archives.postgresql.org/pgsql-hackers-win32/2004-05/msg00252.php>
but not clear how it applies to the current 8b5, if at all.
suggestions?
arrgh,
richard
p.s. i swear on a stack of oreos, i had this working last night ...
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-12-03 23:49:08 | Re: initdb error: "could not identify current directory" (or, what have i done now?) |
Previous Message | Thomas F.O'Connell | 2004-12-03 23:11:13 | Re: Poor Performance with Distinct Subqueries with EXISTS and EXCEPT |