Quickie Part3 - same as part1

From: "Gareth Kirwan" <gbjk(at)thermeoneurope(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Quickie Part3 - same as part1
Date: 2002-10-23 17:13:15
Message-ID: KMEELFAKJGHIGGNIDGHDEEBGJPAA.gbjk@thermeoneurope.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Gareth StationeryI've tried creating the db again - with -D, on another
server... and it's not working.
To clarify things I'm not going to post exactly what happened... spot the
mistake - PLEASE.

[root(at)carsplus structure]$ su - postgres
bash-2.05$ 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
/u/virtual/www*.com/database/data/
Fixing permissions on pre-existing directory
/u/virtual/www*.com/database/data//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.

bash-2.05$ exit
logout
[root(at)carsplus structure]$ service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: /bin/bash: /root/.bashrc: Permission denied
[ OK ]
[root(at)carsplus structure]$ su - postgres
bash-2.05$ createdb -D 'PGDATA2'
ERROR: Postmaster environment variable 'PGDATA2' not set
createdb: database creation failed
bash-2.05$ echo $PGDATA2
/u/virtual/www*.com/database/data/
bash-2.05$ cat .bash_profile
PGDATA=/var/lib/pgsql/data
PGDATA2=/u/virtual/www*.com/database/data/
[ -f $PGDATA/../initdb.i18n ] && source $PGDATA/../initdb.i18n
export PGDATA
export PGDATA2

Thanks

Gareth Kirwan
Programming & Development,
Thermeon Europe Ltd,
gbjk(at)thermeoneurope(dot)com
Tel: +44 (0) 1293 864 303
Thermeon Europe e-Card: gbjk

Browse pgsql-admin by date

  From Date Subject
Next Message Elielson Fontanezi 2002-10-23 17:34:06 shared memory number
Previous Message juerg.rietmann 2002-10-23 13:40:01 pg_dump from within a sql statement