pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPostmaster environment variables
4+ messages / 4 participants
[nested] [flat]
* Postmaster environment variables
@ 2002-06-28 02:23 daniel m <dmeil@acer-access.com>
0 siblings, 3 replies; 4+ messages in thread
From: daniel m @ 2002-06-28 02:23 UTC (permalink / raw)
To: 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?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Postmaster environment variables
@ 2002-06-28 15:12 Fouad Fezzi <Fouad.Fezzi@iup.univ-avignon.fr>
parent: daniel m <dmeil@acer-access.com>
2 siblings, 0 replies; 4+ messages in thread
From: Fouad Fezzi @ 2002-06-28 15:12 UTC (permalink / raw)
To: pgsql-admin
Hi daniel
how do you start postmaster is it with -D ?
If you don't fix problem i can send you script in debian that work with
PGDATA variable.
Fouad
----- Original Message -----
From: "daniel m" <dmeil@acer-access.com>
To: <pgsql-admin@postgresql.org>
Sent: Friday, June 28, 2002 4:23 AM
Subject: [ADMIN] Postmaster environment variables
> 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?
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Postmaster environment variables
@ 2002-06-28 15:15 Nick Fankhauser <nickf@ontko.com>
parent: daniel m <dmeil@acer-access.com>
2 siblings, 0 replies; 4+ messages in thread
From: Nick Fankhauser @ 2002-06-28 15:15 UTC (permalink / raw)
To: daniel m <dmeil@acer-access.com>; pgsql-admin
Daniel-
When you restart postmaster, the process isn't getting this env variable
because it isn't defined in .profile for your postgres user or in a shell
file that .profile executes.
On Debian Linux, you could set this in /var/lib/postgres/.profile or
/etc/postgresql/postgresql.env
Regards,
-Nick
--------------------------------------------------------------------------
Nick Fankhauser nickf@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788
Ray Ontko & Co. Software Consulting Services http://www.ontko.com/
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of daniel m
> Sent: Thursday, June 27, 2002 9:23 PM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] Postmaster environment variables
>
>
> 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?
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Postmaster environment variables
@ 2002-06-28 16:58 Björn Lundin <bjorn.lundin@swipnet.se>
parent: daniel m <dmeil@acer-access.com>
2 siblings, 0 replies; 4+ messages in thread
From: Björn Lundin @ 2002-06-28 16:58 UTC (permalink / raw)
To: pgsql-admin
daniel m wrote:
> 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
sholdn't it be
sh-2.04$ createdb planifgr -D $PGDATA2
?
/Björn
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-06-28 16:58 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-28 02:23 Postmaster environment variables daniel m <dmeil@acer-access.com>
2002-06-28 15:12 ` Fouad Fezzi <Fouad.Fezzi@iup.univ-avignon.fr>
2002-06-28 15:15 ` Nick Fankhauser <nickf@ontko.com>
2002-06-28 16:58 ` Björn Lundin <bjorn.lundin@swipnet.se>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox