Re: RedHat startup script and environment variables in 7.1.2? - Mailing list pgsql-general

From Tom Lane
Subject Re: RedHat startup script and environment variables in 7.1.2?
Date
Msg-id 6298.998591777@sss.pgh.pa.us
Whole thread Raw
In response to Re: RedHat startup script and environment variables in 7.1.2?  (Steve Wampler <swampler@noao.edu>)
Responses Re: RedHat startup script and environment variables in 7.1.2?  (Lamar Owen <lamar.owen@wgcr.org>)
List pgsql-general
Steve Wampler <swampler@noao.edu> writes:
> It seems that it might be nice to have a way to set these "environment
> variables" via entries in postgresql.conf?  Not that I have a good way
> to fit it into the syntax...:

>    export = "SOLISDB=...."

> perhaps?  (Or just add a pg_ctl.conf that contains this information:

>    export SOLISDB=.....

> etc.)   Alternate database locations seem to be part of the configuration,
> since they have to be defined before starting the postmaster - hence the
> suggestion(s) to put them into *.conf.

Actually, I think it's a horrid kluge that the alternate-location
mechanism depends on environment variables at all.  (For one thing,
it's obviously not true that all the pathname-looking environment values
in a typical postgres user's environment are intended as alternate
database locations --- PWD being the most universal counterexample.
There is probably a security hole here.)

I have been thinking that perhaps we could rip out that mess when
we implement tablespaces.  Creation of a tablespace could be the
(superuser-only) operation that replaces definition of an
alternate-location environment variable.

But your thought of a separate config file might be a good short-term
solution.  Names and paths listed in such a file would be known to
be intended as alternate locations.  Instead of looking at the
environment, we'd read the config file to see if an alternate location
is valid.

Anyone feel like working on this?

            regards, tom lane

pgsql-general by date:

Previous
From: Lamar Owen
Date:
Subject: Re: RedHat startup script and environment variables in 7.1.2?
Next
From: Murray Hobbs
Date:
Subject: Re: protected ON DELETE CASCADE