From: | "Barnes" <aardvark(at)ibm(dot)net> |
---|---|
To: | "'Jeff Hoffmann'" <jeff(at)propertykey(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | RE: initlocation and createdb |
Date: | 2000-06-13 22:13:19 |
Message-ID: | 004201bfd584$950fc020$0a64a8c0@fries |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you. This works, and is close to what I need, but if I don't launch
the postmaster from a window with PGDATA2 defined, such as is done with
"/etc/init.d/postgresql start" or on a system boot, then it doesn't work. I
tried to export PGDATA2 within /etc/init.d/postgresql, but that didn't work
for me.
Can I make this work from within /etc/init.d/postgresql, or do have to start
the postmaster from a shell with the PGDATA2 already defined?
Thanks again.
-----Original Message-----
From: Jeff Hoffmann [mailto:jeff(at)propertykey(dot)com]
Sent: Tuesday, June 13, 2000 5:29 PM
To: Barnes
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] initlocation and createdb
Barnes wrote:
>
> 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
restart the postmaster & it should work fine. the environment variable
has to be defined before the postmaster is started in order for the
alternet locations to work. this has been covered a number of times
recently. wasn't it also added to the FAQ or some other documentation
not too long ago?
--
Jeff Hoffmann
PropertyKey.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-06-13 22:14:16 | Re: initlocation and createdb |
Previous Message | Jan Wieck | 2000-06-13 21:42:24 | Re: triggers and functions in pgsql 7.0.2 |