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