From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Christoph Berg <myon(at)debian(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.) |
Date: | 2019-06-04 10:20:14 |
Message-ID: | 87blzdacpp.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
>>>>> "Christoph" == Christoph Berg <myon(at)debian(dot)org> writes:
>> Etc/UCT is now a backward-compatibility link to Etc/UTC, instead of
>> being a separate zone that generates the abbreviation "UCT", which
>> nowadays is typically a typo. Postgres will still accept "UCT" as an
>> input zone name, but it won't output it.
Christoph> There is something wrong here. On Debian Buster/unstable,
Christoph> using system tzdata (2019a-1), if /etc/timezone is
Christoph> "Etc/UTC":
Christoph> 11.3's initdb adds timezone = 'UCT' to postgresql.conf
Christoph> 12beta1's initdb add timezone = 'Etc/UCT' to postgresql.conf
Christoph> Is that expected behavior?
It's clearly not what users expect and it's clearly the wrong thing to
do, though it's the expected behavior of the current code:
* On most systems, we rely on trying to match the observable behavior of
* the C library's localtime() function. The database zone that matches
* furthest into the past is the one to use. Often there will be several
* zones with identical rankings (since the IANA database assigns multiple
* names to many zones). We break ties arbitrarily by preferring shorter,
* then alphabetically earlier zone names.
I believe I pointed out a long, long time ago that this tie-breaking
strategy was insane, and that the rule should be to prefer canonical
names and use something else only in the case of a strictly better
match.
If TZ is set or if /etc/localtime is a symlink rather than a hardlink or
copy of the zone file, then PG can get the zone name directly rather
than having to do the comparisons, so the above comment doesn't apply;
that gives you a workaround.
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2019-06-04 11:58:10 | pgsql: doc: Fix whitespace |
Previous Message | Christoph Berg | 2019-06-04 08:57:35 | UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.) |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Khandekar | 2019-06-04 10:21:01 | Re: Minimal logical decoding on standbys |
Previous Message | Christoph Berg | 2019-06-04 08:57:35 | UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.) |