Skip site navigation (1) Skip section navigation (2)

Postmaster environment variables

From: daniel m <dmeil(at)acer-access(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Postmaster environment variables
Date: 2002-06-28 02:23:02
Message-ID: 3D1BC886.2A908335@acer-access.com (view raw or flat)
Thread:
Lists: pgsql-admin
I am trying to relocate my database,  as per instructions in the manual:

Under user postgres :

sh-2.04$ PGDATA2=/home/postgres/data
sh-2.04$ export PGDATA2
sh-2.04$ echo $PGDATA2
/home/postgres/data

I stop the postmaster and :
sh-2.04$ /usr/lib/postgresql/bin/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/postgres/data
Fixing permissions on pre-existing directory /home/postgres/data/base

initlocation is complete. (...)

I restart the postmaster and :

sh-2.04$ createdb planifgr -D 'PGDATA2'
ERROR:  Postmaster environment variable 'PGDATA2' not set
createdb: database creation failed

although :

sh-2.04$ echo $PGDATA2
/home/postgres/data

I even tried to set the variable from within the scripts (debian distr.)
that start the backend (etc/init.d/postgresql). Same response.

Where is the variable?





Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2002-06-28 03:59:36
Subject: Re: Are statistics gathered on function indexes?
Previous:From: Tim EllisDate: 2002-06-28 00:20:39
Subject: Dia --> SQL (tedia2sql 0.58 Released

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group