Thread: Re: Database alternate locations

Re: Database alternate locations

From
root@localhost.localdomain (Jules Alberts)
Date:
On Fri, 21 Dec 2001 13:41:43 -0800, David Larsen
<david@coastaltie.com> wrote:
>I am running PostgreSQL 7.0.3 on RedHat 7.1.  I would like to create
>databases in /u1/psql/data, and can't get it to work.  I defined
>PGDATA2=/u1/psql/data and exported it in my .bash_profile for
>postgres user.  I even went so far as to add the varible and export
>it in my /etc/rc.d/init.d/postgresql startup script.  I stopped
>postgresql and ran the command:
>
>% initlocation $PGDATA2
>
>That worked fine and the necessary directories are created.  I then
>run:
>
>% createdb -D PGDATA2 mydb
>
>and get the following error:
>
>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.
>
>I have not enabled absolute paths, however I tried an absolute path
>anyway and run:
>
>% createdb -D $PGDATA2 mydb
>
>I get basically the same error:
>
>ERROR:  The database path '/u1/psql/data' 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
>
>I have read the documentation on using alternate database locations
>in detail, but to no avail.  Can anyone help?
>
>

you may try using a path name with no numeric characters in it. that
would explain the errormessage "due to a character that is not
allowed"

HTH, HAND

--
Jules Alberts