Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> It occurred to me, we really do need to save the environment of the
> postmaster. Consider such variables as LANG, LC_*, PATH (to find
> executable), PGPORT, PGDATESTYLE, TZ.
Particularly the locale-related env vars. I think it is a serious
bug in the current system that it is possible to start the postmaster
with locale vars different from the values in effect at initdb time.
You can corrupt your text-column indices completely that way, because
the sort ordering an index depends on can change from run to run.
(We've only seen one or two bug reports we could trace to this, AFAIR,
but I'm surprised we don't see a steady stream of 'em. It's just too
easy to screw up if you sometimes start your postmaster from an
interactive environment and sometimes from system boot scripts.)
An opts file is not a reliable solution --- initdb ought to be recording
all the locale-relevant variables in pg_control, or some such NON user
editable place, and postmaster or backend startup ought to force those
values to be re-adopted.
PGDATESTYLE/TZ are not dangerous as far as I know; it should be allowed
for the user to change these.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Tatsuo Ishii||Date: 2000-06-25 02:46:20|
|Subject: Re: [HACKERS] Re: Call for port testing on fmgr changes -- Results!|
|Previous:||From: Tom Lane||Date: 2000-06-25 01:59:58|
|Subject: Re: 64-bit sequences |