Re: alternative DB locations

From: Nelson Ferreira Jr <nelson(at)radix(dot)com(dot)br>
To: Bob Parkinson <rwp(at)biome(dot)ac(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: alternative DB locations
Date: 2000-10-03 14:18:17
Message-ID: 39D9EAA8.E77E8546@radix.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)biome(dot)ac(dot)uk
> ------------------------------------------------------------------
> Technical Manager: Biome http://biome.ac.uk/
>
> Greenfield Medical Library,
> Queens Medical Centre,
> Nottingham. 0115 9249924 x 42059
> ------------------------------------------------------------------
> We are stardust

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roderick A. Anderson 2000-10-03 14:24:03 Re: Fake table name?
Previous Message Bob Parkinson 2000-10-03 13:50:17 alternative DB locations