Re: initdb $PGDATA not working

From: Andy Colson <andy(at)squeakycode(dot)net>
To: Daniel Vázquez <daniel2d2art(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: initdb $PGDATA not working
Date: 2012-02-09 21:39:26
Message-ID: 4F343D0E.8060705@squeakycode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/9/2012 3:25 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
>
> Thx
>
>
>

I'm guessing /etc/init.d/postgresql-9.1 is a script that is ignoring
your arguments: initdb, $PGDATA, and -D /path/.

I'd say dont use that script and go right for the origional initdb.

-Andy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alan Hodgson 2012-02-09 21:43:57 Re: initdb $PGDATA not working
Previous Message Daniel Vázquez 2012-02-09 21:25:51 initdb $PGDATA not working