From: | Richard J Kuhns <rjk(at)grauel(dot)com> |
---|---|
To: | "Barnes" <aardvark(at)ibm(dot)net> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | initlocation and createdb |
Date: | 2000-06-13 21:39:38 |
Message-ID: | 14662.43546.255728.28718@localhost.grauel.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Barnes writes:
> I'm having trouble setting up databases in a new location. In particular, I
> do the following:
>
> [postgres(at)whopper pgdata]$ export PGDATA2=/home/pgdata
> [postgres(at)whopper pgdata]$ initlocation PGDATA2
> The location will be initialized with username "postgres".
> This user will own all the files and must also own the server process.
>
> Fixing permissions on pre-existing directory /home/pgdata
> Creating directory /home/pgdata/base
>
> initlocation is complete.
> You can now create a database using
> CREATE DATABASE <name> WITH LOCATION = 'PGDATA2'
> in SQL, or
> createdb <name> -D 'PGDATA2'
> from the shell.
>
> [postgres(at)whopper pgdata]$ createdb optodb -D 'PGDATA2'
> ERROR: The database path 'PGDATA2' is invalid. This may be due to a
> character that is not allowed or because the chosen path isn't permitted for
> databases
> createdb: database creation failed
> [postgres(at)whopper pgdata]$
>
> The permissions for /home/pgdata are
>
> drwx------ 3 postgres postgres 4096 Jun 13 16:41 pgdata
>
> What am I doing wrong? Is /home not permitted for databases? If so, why
> not, and what is permitted?
>
> Thank you for any help.
>
> David Barnes
>
You need to stop the backend and restart it with "PGDATA2=/home/pgdata" in
it's environment.
- Rich
--
Richard Kuhns rjk(at)grauel(dot)com
PO Box 6249 Tel: (765)477-6000 \
100 Sawmill Road x319
Lafayette, IN 47903 (800)489-4891 /
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2000-06-13 21:42:24 | Re: triggers and functions in pgsql 7.0.2 |
Previous Message | Barnes | 2000-06-13 21:31:20 | RE: initlocation and createdb |