Re: unable to pass variable PGDATA2 into server environment - Mailing list pgsql-admin

From Tom Lane
Subject Re: unable to pass variable PGDATA2 into server environment
Date
Msg-id 29053.1088704519@sss.pgh.pa.us
Whole thread Raw
In response to unable to pass variable PGDATA2 into server environment  (Jean-Christophe Weis <jcweis@melix.net>)
Responses Re: unable to pass variable PGDATA2 into server environment
List pgsql-admin
Jean-Christophe Weis <jcweis@melix.net> writes:
> The variable PGDATA2 is set and marked for export in the root shell where I
> start the server, but it is not passed into the server's environment.

No, because the start script is going to su to the postgres account,
and su is going to reset the environment.  The usual advice for doing
this sort of thing is to set the environment variable in the postgres
user's .profile file.  That way the postmaster has it, and you also
have it if you manually su to postgres.

(This whole benighted environment-variable scheme is gone in CVS tip,
thank goodness.)

            regards, tom lane

pgsql-admin by date:

Previous
From: Kris Kiger
Date:
Subject: Bug?
Next
From: tfo@alumni.brown.edu (Thomas F. O'Connell)
Date:
Subject: Re: pg_restore usage