From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: initdb $PGDATA not working |
Date: | 2012-02-09 21:54:21 |
Message-ID: | 4F34408D.8000802@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | David Salisbury | 2012-02-09 22:10:09 | Re: Strategy for Primary Key Generation When Populating Table |
Previous Message | Alan Hodgson | 2012-02-09 21:43:57 | Re: initdb $PGDATA not working |