Re: Struggling to change default data location - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Struggling to change default data location
Date
Msg-id Pine.LNX.4.30.0104261716070.758-100000@peter.localdomain
Whole thread Raw
In response to Struggling to change default data location  (Geoff Caplan <geoff@productivity.co.uk>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: state locked row (PLEASE HELP ME)
Next
From: Peter Eisentraut
Date:
Subject: Re: using POSTGRES in a network