Geoff Caplan writes:
> initdb does not write a postmaster.opt file at the new location. On
> system startup, it does write the .opt file to /var/lib/pgsql/data.
The environment initdb runs in when it runs at system startup is probably
not the one you set up. Check the /etc/init.d/postgresql file for
details.
> Editing this file with the new datapath does not change the behaviour
> below.
It's not intended to.
> At this stage - here is what I get...
>
> $ /usr/bin/pg_ctl -D /www/dbdata -l logfile start
> postmaster successfully started
> $ pg_ctl status
> pg_ctl: postmaster or postgres is not running
pg_ctl -D /www/dbdata status
> $ ps ax | grep postmaster
> 582 ? S 0:00 /usr/bin/postmaster -D /var/lib/pgsql/data
Peculiar. Can you run
sh -x /usr/bin/pg_ctl -D /www/dbdata -l logfile start
and look how the shell command that starts the postmaster looks like?
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter