Re: initdb $PGDATA not working
От | John R Pierce |
---|---|
Тема | Re: initdb $PGDATA not working |
Дата | |
Msg-id | 4F34408D.8000802@hogranch.com обсуждение исходный текст |
Ответ на | initdb $PGDATA not working (Daniel Vázquez <daniel2d2art@gmail.com>) |
Список | pgsql-general |
On 02/09/12 1:25 PM, Daniel Vázquez wrote: > I've set my PGDATA variable in profile > export PGDATA=/home/mydata/pgsql/data > > Testing variable for correct set in enviroment > $ echo $PGDATA > /home/mydata/pgsql/data > > but when execute: > $ sudo /etc/init.d/postgresql-9.1 initdb > > or execute: > $ sudo /etc/init.d/postgresql-9.1 initdb -D /home/mydata/pgsql/data > > The cluster always is created on default path "/var/lib/pgsql/9.1/data/" > > Will install in CentOS 5.7 the /etc/init.d/postgresql* scripts are completely selfcontained and don't use any external environment variables. you can put custom settings in /etc/sysconfig/pgsql/postgresql-9.1 (where the last part of the filename is the same as the /etc/init.d/ script name). the main things you'd set in those scripts are... PGENGINE=/usr/pgsql-${PGMAJORVERSION}/bin PGPORT=5432 PGDATA=/var/lib/pgsql/${PGMAJORVERSION}/data PGLOG=/var/lib/pgsql/${PGMAJORVERSION}/pgstartup.log However, if you're creating a cluster under your own home directory, I'm not sure you even want it to be under the control of the system scripts. -- john r pierce N 37, W 122 santa cruz ca mid-left coast
В списке pgsql-general по дате отправления: