Re: alternative DB locations - Mailing list pgsql-general

From Nelson Ferreira Jr
Subject Re: alternative DB locations
Date
Msg-id 39D9EAA8.E77E8546@radix.com.br
Whole thread Raw
In response to alternative DB locations  (Bob Parkinson <rwp@biome.ac.uk>)
List pgsql-general
     Hi,

     It sounds strange, but you have to export PGDATA2 variable BEFORE
starting Postgres. So you have to kill the postmaster, set the system variable
and start postmaster again.



Nelson


Bob Parkinson wrote:

> Hi,
>
> I'm just trying the three lines from the initlocation online man page
> (version 7.0.2) as postgres. postgres owns the locations, and initlocation
> runs OK, but it don't like to create the DB.
>
> omni.ac.uk> whoami
> postgres
> omni.ac.uk> export PGDATA2=/public_searchable_0
> omni.ac.uk> 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 /public_searchable_0
> Fixing permissions on pre-existing directory /public_searchable_0/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.
>
> omni.ac.uk> createdb 'testdb' -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
>
> The shell is bash. What am I missing please?
>
> Cheers,
>
> Bob
>
> Bob Parkinson
> rwp@biome.ac.uk
> ------------------------------------------------------------------
> Technical Manager:              Biome          http://biome.ac.uk/
>
> Greenfield Medical Library,
> Queens Medical Centre,
> Nottingham.                                   0115 9249924 x 42059
> ------------------------------------------------------------------
>                         We are stardust


pgsql-general by date:

Previous
From: Bob Parkinson
Date:
Subject: alternative DB locations
Next
From: "Roderick A. Anderson"
Date:
Subject: Re: Fake table name?