Quickie about Database locations - Mailing list pgsql-admin

From Gareth Kirwan
Subject Quickie about Database locations
Date
Msg-id KMEELFAKJGHIGGNIDGHDCEPKJOAA.gbjk@thermeoneurope.com
Whole thread Raw
Responses Re: Quickie about Database locations
List pgsql-admin
Hey all!
 
I'm muddled up about something.
I'm creating a new database, and absolute paths are disallowed.
Therefore I su to postgres ( the owner of the service ) and run the following:
 
export PGDATA2=/bla/bla/bla
initlocation PGDATA2
 
initlocation returns fine - telling me to create the database as per usual.
I therefore do:
 
createdb v2 -D 'PGDATA2'
 
But I get:
 
ERROR:  Postmaster environment variable 'PGDATA2' not set
createdb: database creation failed
 
I echo it - to test it - it works.
I put it in the bash_profile of the user, restart postgres... nothing...
 
Any ideas?
 
Thanks everyone
 
Gareth Kirwan
Programming & Development,
Thermeon Europe Ltd,
gbjk@thermeoneurope.com
Tel: +44 (0) 1293 864 303
Thermeon Europe e-Card: gbjk

pgsql-admin by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Using oid with RServ w/ Postgresql 7.2
Next
From: "Igor Georgiev"
Date:
Subject: Re: Security question : Database access control