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

pgsql: Simplify handling of the timezone GUC by making initdb chooseth

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Simplify handling of the timezone GUC by making initdb chooseth
Date: 2011-09-09 21:59:45
Message-ID: E1R296v-00014A-D2@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ca4af308c32d03db5fbacb54d6e583ceb904f268

Modified Files
--------------
doc/src/sgml/config.sgml                      |   14 +-
doc/src/sgml/datatype.sgml                    |   21 +-
doc/src/sgml/ref/set.sgml                     |    4 +-
src/backend/bootstrap/bootstrap.c             |    4 -
src/backend/commands/variable.c               |   43 +-
src/backend/postmaster/postmaster.c           |   15 -
src/backend/tcop/postgres.c                   |    4 -
src/backend/utils/error/elog.c                |   29 +-
src/backend/utils/misc/guc-file.l             |    1 -
src/backend/utils/misc/guc.c                  |   21 +-
src/backend/utils/misc/postgresql.conf.sample |    4 +-
src/bin/initdb/.gitignore                     |    1 +
src/bin/initdb/Makefile                       |   11 +-
src/bin/initdb/findtimezone.c                 | 1224 ++++++++++++++++++++++++
src/bin/initdb/initdb.c                       |   25 +-
src/include/pgtime.h                          |   23 +-
src/include/utils/guc.h                       |    2 -
src/timezone/localtime.c                      |   28 +
src/timezone/pgtz.c                           | 1265 +------------------------
19 files changed, 1372 insertions(+), 1367 deletions(-)

Responses

pgsql-hackers by date

Next:From: Daniel FarinaDate: 2011-09-09 22:02:53
Subject: Re: Should I implement DROP INDEX CONCURRENTLY?
Previous:From: Alvaro HerreraDate: 2011-09-09 21:31:30
Subject: Re: augmenting MultiXacts to improve foreign keys

pgsql-committers by date

Next:From: Alvaro HerreraDate: 2011-09-10 01:31:53
Subject: nonempty default log_line_prefix (was [COMMITTERS] pgsql: Simplify handling of the timezone GUC)
Previous:From: Tom LaneDate: 2011-09-09 17:23:54
Subject: pgsql: Move Timestamp/Interval typedefs and basic macros intodatatype/

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