* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.207 2005/10/15 02:49:12 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.208 2005/10/20 20:05:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
if (!SelectConfigFiles(userDoption, progname))
proc_exit(1);
+ /* If timezone is not set, determine what the OS uses */
+ pg_timezone_initialize();
}
/* Validate we have been given a reasonable-looking DataDir */
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.470 2005/10/17 16:24:19 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.471 2005/10/20 20:05:44 tgl Exp $
*
* NOTES
*
}
/*
- * Other one-time internal sanity checks can go here.
+ * Other one-time internal sanity checks can go here, if they are fast.
+ * (Put any slow processing further down, after postmaster.pid creation.)
*/
if (!CheckDateTokenTables())
{
(errmsg_internal("-----------------------------------------")));
}
- /*
- * Initialize SSL library, if specified.
- */
-#ifdef USE_SSL
- if (EnableSSL)
- secure_initialize();
-#endif
-
- /*
- * process any libraries that should be preloaded and optionally
- * pre-initialized
- */
- if (preload_libraries_string)
- process_preload_libraries(preload_libraries_string);
-
/*
* Fork away from controlling terminal, if -S specified.
*
*/
CreateDataDirLockFile(true);
+ /*
+ * If timezone is not set, determine what the OS uses. (In theory this
+ * should be done during GUC initialization, but because it can take as
+ * much as several seconds, we delay it until after we've created the
+ * postmaster.pid file. This prevents problems with boot scripts that
+ * expect the pidfile to appear quickly.)
+ */
+ pg_timezone_initialize();
+
+ /*
+ * Initialize SSL library, if specified.
+ */
+#ifdef USE_SSL
+ if (EnableSSL)
+ secure_initialize();
+#endif
+
+ /*
+ * process any libraries that should be preloaded and optionally
+ * pre-initialized
+ */
+ if (preload_libraries_string)
+ process_preload_libraries(preload_libraries_string);
+
/*
* Remove old temporary files. At this point there can be no other
* Postgres processes running in this directory, so this should be safe.
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.466 2005/10/15 02:49:27 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.467 2005/10/20 20:05:45 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
{
if (!SelectConfigFiles(userDoption, argv[0]))
proc_exit(1);
+ /* If timezone is not set, determine what the OS uses */
+ pg_timezone_initialize();
}
/*
* Written by Peter Eisentraut
.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.294 2005/10/16 18:26:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.295 2005/10/20 20:05:45 tgl Exp $
*
*--------------------------------------------------------------------
*/
free(configdir);
- /* If timezone is not set, determine what the OS uses */
- pg_timezone_initialize();
-
return true;
}