createdb -- alternate locations

From: "Richard J(dot) Kuhns" <rjk(at)grauel(dot)com>
To: "J(dot)R(dot)" <jrbelding(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: createdb -- alternate locations
Date: 2000-05-26 14:05:18
Message-ID: 14638.33950.400689.367817@sawmill.grauel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

J.R. writes:
> 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"
>
> I also tried createdb -D 'PGDATA2' testdb, same result.
>
>
> Any ideas what I'm doing wrong?

What a coincidence; I just asked about this last week. What you've got is
right, but before you can createdb, you've got to stop and restart the
postmaster with "PGDATA2=/home/postgres/testdata" in its environment.

Good luck...

--
Richard Kuhns rjk(at)grauel(dot)com
PO Box 6249 Tel: (765)477-6000 \
100 Sawmill Road x319
Lafayette, IN 47903 (800)489-4891 /

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Wampler 2000-05-26 14:18:30 Speed of locating tables?
Previous Message Jeff Hoffmann 2000-05-26 13:31:25 Re: createdb -- alternate locations