]> granicus.if.org Git - postgresql/commit
Simplify handling of the timezone GUC by making initdb choose the default.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Sep 2011 21:59:11 +0000 (17:59 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Sep 2011 21:59:11 +0000 (17:59 -0400)
commitca4af308c32d03db5fbacb54d6e583ceb904f268
tree352fb06319a1c8e3efd78acaca9cc8b8ff0e7eda
parenta7801b62f21bd051444bd1119cd3745ecc8e14ec
Simplify handling of the timezone GUC by making initdb choose the default.

We were doing some amazingly complicated things in order to avoid running
the very expensive identify_system_timezone() procedure during GUC
initialization.  But there is an obvious fix for that, which is to do it
once during initdb and have initdb install the system-specific default into
postgresql.conf, as it already does for most other GUC variables that need
system-environment-dependent defaults.  This means that the timezone (and
log_timezone) settings no longer have any magic behavior in the server.
Per discussion.
19 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/datatype.sgml
doc/src/sgml/ref/set.sgml
src/backend/bootstrap/bootstrap.c
src/backend/commands/variable.c
src/backend/postmaster/postmaster.c
src/backend/tcop/postgres.c
src/backend/utils/error/elog.c
src/backend/utils/misc/guc-file.l
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/bin/initdb/.gitignore
src/bin/initdb/Makefile
src/bin/initdb/findtimezone.c [new file with mode: 0644]
src/bin/initdb/initdb.c
src/include/pgtime.h
src/include/utils/guc.h
src/timezone/localtime.c
src/timezone/pgtz.c