Re: createdb -- alternate locations - Mailing list pgsql-general

From Jeff Hoffmann
Subject Re: createdb -- alternate locations
Date
Msg-id 392E7CAD.13F53701@propertykey.com
Whole thread Raw
In response to createdb -- alternate locations  ("J.R." <jrbelding@yahoo.com>)
List pgsql-general
"J.R." wrote:
>
>     Hello:
>
> Novice, just installed PGSQL 7.0 on Redhat 6.1.
>
> Everything went smoothly with initial installation and db setup.
> However, I've run into some problems subsequently.
>
> To keep it simple, here is a specific problem.  Attempting to create a
> database in an alternate location, I went through the following steps as
> the superuser (postgres):
>
> mkdir /home/postgres/testdata
> export PGDATA2=/home/postgres/testdata
> initlocation PGDATA2
> createdb testdb -D 'PGDATA2'
>
> the last command failed with this error:
> "The database path 'PGDATA2' in invalid.  This may be due to a character
> that is not allowed or because the chosen path isn't permitted for
> databases"
>

does anybody actually read the mailing lists?  i think this was covered
last week.  it's almost certainly that the postmaster was started before
the environment variable was declared.  the postmaster needs to be
restarted with the environment variable set in order for this to work.
this should probably be put in bold print in the docs or in a faq  (if i
recall correctly, i think it's mentioned there).  it'd even be a good
use of annotable documentation, too.  it seems like there are a lot of
novice mistakes like that that are common & very frustrating to new
users & that annotated docs or expanded faqs would be really helpful.

jeff

pgsql-general by date:

Previous
From: Ron Peterson
Date:
Subject: Re: Migrating from mysql.
Next
From: "Richard J. Kuhns"
Date:
Subject: createdb -- alternate locations