Re: About the pid and opts files
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgresql.org
Date: 2000-06-25T02:27:19Z
Lists: pgsql-hackers
Peter Eisentraut <peter_e@gmx.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