pgsql: Switch over to using the src/timezone functions for formatting - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Switch over to using the src/timezone functions for formatting
Date
Msg-id 20070804012654.B858D9FB6AF@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Switch over to using the src/timezone functions for formatting timestamps
displayed in the postmaster log.  This avoids Windows-specific problems with
localized time zone names that are in the wrong encoding, and generally seems
like a good idea to forestall other potential platform-dependent issues.
To preserve the existing behavior that all backends will log in the same time
zone, create a new GUC variable log_timezone that can only be changed on a
system-wide basis, and reference log-related calculations to that zone instead
of the TimeZone variable.

This fixes the issue reported by Hiroshi Saito that timestamps printed by
xlog.c startup could be improperly localized on Windows.  We still need a
simpler patch for that problem in the back branches, however.

Modified Files:
--------------
    pgsql/doc/src/sgml:
        config.sgml (r1.135 -> r1.136)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/config.sgml.diff?r1=1.135&r2=1.136)
        datatype.sgml (r1.205 -> r1.206)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/datatype.sgml.diff?r1=1.205&r2=1.206)
    pgsql/src/backend/access/transam:
        xlog.c (r1.276 -> r1.277)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c.diff?r1=1.276&r2=1.277)
    pgsql/src/backend/commands:
        variable.c (r1.120 -> r1.121)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/variable.c.diff?r1=1.120&r2=1.121)
    pgsql/src/backend/postmaster:
        syslogger.c (r1.35 -> r1.36)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/syslogger.c.diff?r1=1.35&r2=1.36)
    pgsql/src/backend/utils/adt:
        date.c (r1.134 -> r1.135)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/date.c.diff?r1=1.134&r2=1.135)
        datetime.c (r1.181 -> r1.182)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/datetime.c.diff?r1=1.181&r2=1.182)
        formatting.c (r1.130 -> r1.131)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/formatting.c.diff?r1=1.130&r2=1.131)
        nabstime.c (r1.150 -> r1.151)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/nabstime.c.diff?r1=1.150&r2=1.151)
        timestamp.c (r1.180 -> r1.181)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c.diff?r1=1.180&r2=1.181)
    pgsql/src/backend/utils/error:
        elog.c (r1.191 -> r1.192)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/error/elog.c.diff?r1=1.191&r2=1.192)
    pgsql/src/backend/utils/misc:
        guc.c (r1.408 -> r1.409)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c.diff?r1=1.408&r2=1.409)
        postgresql.conf.sample (r1.222 -> r1.223)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/postgresql.conf.sample.diff?r1=1.222&r2=1.223)
    pgsql/src/include/commands:
        variable.h (r1.29 -> r1.30)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/variable.h.diff?r1=1.29&r2=1.30)
    pgsql/src/include:
        pgtime.h (r1.15 -> r1.16)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/pgtime.h.diff?r1=1.15&r2=1.16)
    pgsql/src/timezone:
        pgtz.c (r1.51 -> r1.52)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/timezone/pgtz.c.diff?r1=1.51&r2=1.52)

pgsql-committers by date:

Previous
From: eggyknap@pgfoundry.org (User Eggyknap)
Date:
Subject: pgsnmpd - pgsnmpd: Fix silly mistake with child process -- another bug
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Suppress time zone name (%Z) when logging timestamps in xlog.c