1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Fix crash caused by log_timezone patch if we attempt to emit any elog messages

between the setting of log_line_prefix and the setting of log_timezone.  We
can't realistically set log_timezone any earlier than we do now, so the best
behavior seems to be to use GMT zone if any timestamps are to be logged during
early startup.  Create a dummy zone variable with a minimal definition of GMT
(in particular it will never know about leap seconds), so that we can set it
up without reference to any external files.
This commit is contained in:
Tom Lane
2007-08-04 19:29:25 +00:00
parent 0b9d3d4dcd
commit 4fd8d6b3e7
5 changed files with 67 additions and 10 deletions

View File

@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.409 2007/08/04 01:26:54 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.410 2007/08/04 19:29:25 tgl Exp $
*
*--------------------------------------------------------------------
*/
@ -2926,6 +2926,12 @@ InitializeGUCOptions(void)
char *env;
long stack_rlimit;
/*
* Before log_line_prefix could possibly receive a nonempty setting,
* make sure that timezone processing is minimally alive (see elog.c).
*/
pg_timezone_pre_initialize();
/*
* Build sorted array of all GUC variables.
*/