Thread: initlocation / createdb won't work

initlocation / createdb won't work

From
Holger Schurig
Date:
I have the postgresql-7.0.3-2 rpm from ftp.postgresql.org installed on
a Red Hat 6.2 box.

However, I get a strange error. Running as user "postgres" I execute
the following statements:

CREATE DATABASE
mnz66:~$ initlocation /var/tmp/xx
The location will be initialized with username "postgres".
This user will own all the files and must also own the server process.

Creating directory /var/tmp/xx
Creating directory /var/tmp/xx/base

initlocation is complete.

mnz66:~$ createdb testdb -D '/var/tmp/xx/testdb'
ERROR:  The database path '/var/tmp/xx/testdb' 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



So it seems that I have to play symlink tricks to get my database
anywhere else then in /var/lib/pqsql/data ...