Skip site navigation (1) Skip section navigation (2)

Re: About the pid and opts files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: About the pid and opts files
Date: 2000-06-25 02:27:19
Message-ID: 22109.961900039@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
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

Responses

pgsql-hackers by date

Next:From: Tatsuo IshiiDate: 2000-06-25 02:46:20
Subject: Re: [HACKERS] Re: Call for port testing on fmgr changes -- Results!
Previous:From: Tom LaneDate: 2000-06-25 01:59:58
Subject: Re: 64-bit sequences

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group