Skip site navigation (1) Skip section navigation (2)

Re: Please help On Alternative Database Location

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Francesco Protano <fprotano(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Please help On Alternative Database Location
Date: 2001-03-27 15:34:30
Message-ID: 5392.985707270@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Francesco Protano <fprotano(at)yahoo(dot)com> writes:
> I work under Linux platform, Mandrake 7.2
> distribution, and i need to create a postgres
> database, for example called "mydb", in alternative
> location, for example "/home/username". In the
> official documentation this is very simple to do, but
> in the reality i have failed.
> This is my steps
> 1) su - username
> 2) set PGDATA2 = "/home/username" (but i tried
> relatives path too)
> 3) initlocation $PGDATA2
> 4) createdb -D $PGDATA2 mydb

The environment variable PGDATA2 needs to be present in the postmaster's
environment, not only the client's.  Also, leave off the $ in steps 3
and 4; you are trying to pass the name of the environment variable to
the postmaster, not its value.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Peter EisentrautDate: 2001-03-27 15:53:10
Subject: Re: Please help On Alternative Database Location
Previous:From: Cid R AndradeDate: 2001-03-27 14:43:32
Subject: Bug about 'Foreign Key'

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group