pgsql: Simplify handling of the timezone GUC by making initdb choose th

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 choose th
Date: 2011-09-09 21:59:45
Message-ID: E1R296v-00014A-D2@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-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

Browse pgsql-committers by date

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

Browse pgsql-hackers by date

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