Search Postgresql Archives

Re: initdb $PGDATA not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, February 09, 2012 10:25:51 PM Daniel Vázquez wrote:
> Hi!
> 
> 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 init script doesn't take command line options except the initdb action. 
And it sets PGDATA itself.

Perhaps su postgres -c "initdb -D /home/mydata/pgsql/data" or something 
similar might work better. Or modifying the init script before using it, which 
would have the advantage that it might also start the server later using your 
new data directory.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux