Re: unable to pass variable PGDATA2 into server environment

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jean-Christophe Weis <jcweis(at)melix(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: unable to pass variable PGDATA2 into server environment
Date: 2004-07-01 17:55:19
Message-ID: 29053.1088704519@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jean-Christophe Weis <jcweis(at)melix(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Lee Wu 2004-07-01 20:25:02 C function from 7.3.2 to 7.4.3
Previous Message Jean-Christophe Weis 2004-07-01 16:23:49 unable to pass variable PGDATA2 into server environment