Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYw2b-00045b-1A for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jun 2019 17:19:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hYw2Z-0004wL-QY for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jun 2019 17:19:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYw2X-0004pp-Nk for pgsql-hackers@lists.postgresql.org; Thu, 06 Jun 2019 17:19:03 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYw2S-0005e3-IA for pgsql-hackers@postgresql.org; Thu, 06 Jun 2019 17:19:01 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B54D222125; Thu, 6 Jun 2019 13:18:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 06 Jun 2019 13:18:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=cmLcE5xs/2I2VuK4h4clMyd792B TGk63oQUfxTEOAyc=; b=F7HqC78znuQgVvT5pQ96p/92V/5h7pvEG1GobPKt5cM AujNdtNdipfSj3k4a5eMlsBAKhk30SQoxyQ/fHI7oldBddiBTOwMzFnzA+/jJMP9 QpjIgIfihtI0Mb9RfjwiDNy13itDNPiHuP0kfrZefXKE1EhzfCi56GSbxrNcw74H 31M9zedLH0oo462ZJJ3CJBywXoHoZcmxwZasq91rb86FtQRJMRFVJpNiAGpUEU5z zwu7QOtfTgYICtesYfzyiOnmpfofS2RUBNqwHmIIR0ScBNgpl13geXu3Ytys6nS1 JtRUO1pCTFPLOOJe/xgi3Qzoovd6+urjxuG+NwcHDbg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=cmLcE5 xs/2I2VuK4h4clMyd792BTGk63oQUfxTEOAyc=; b=DF8PLk5WirFb+QobtfOAxG IBsnfbUiSSZKB1eMJx3liO/cEJFzGKTUef5YGVTKlZ1AyBFvOZMKNffSSNRY8cOK T9XvMGZ09PLiP0bQX9ep+lzq9m8QkM4e6j0u9+oKQOHd0LSOXCIsNfW+vHcl2EHd WP2DbllkXPiv9SabrVxTwQN++K+SX9puGOx69DRGYEJSFKAfKQqnrUdKePe6harf mhrKJh4lUMdoDbR0owRoWM1At0HZ0wo5sozZf+UFlPxuI5je5o/4mmU1lfU/OFdD fj7s7ZWBqG7POjPcuJQqletXh4qyQbqC+xIaVoVxG1RrYIqmETVf2mbTgUOcjYFQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudeggedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecukfhppe eijedrudeitddrvddukedrvdefjeenucfrrghrrghmpehmrghilhhfrhhomheprghnughr vghssegrnhgrrhgriigvlhdruggvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-218-237.hsd1.ca.comcast.net [67.160.218.237]) by mail.messagingengine.com (Postfix) with ESMTPA id 8FB88380087; Thu, 6 Jun 2019 13:18:52 -0400 (EDT) Date: Thu, 6 Jun 2019 10:18:50 -0700 From: Andres Freund To: Tom Lane Cc: Andrew Gierth , Christoph Berg , PostgreSQL Hackers Subject: Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.) Message-ID: <20190606171850.ilssehzrvrrfuiqs@alap3.anarazel.de> References: <20190604085735.GD24018@msg.df7cb.de> <87ftop8gtr.fsf@news-spur.riddles.org.uk> <20190604164457.772invck3lgxk75s@alap3.anarazel.de> <5519.1559839890@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5519.1559839890@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-06-06 12:51:30 -0400, Tom Lane wrote: > [ sorry for slow response, I'm on vacation ] Good. > Andres Freund writes: > > That makes sense. As far as I can tell the reason that 12 sometimes ends > > up with the proper timezone is that we shortcut the search by: > > > /* > > * Try to avoid the brute-force search by seeing if we can recognize the > > * system's timezone setting directly. > > * > > * Currently we just check /etc/localtime; there are other conventions for > > * this, but that seems to be the only one used on enough platforms to be > > * worth troubling over. > > */ > > if (check_system_link_file("/etc/localtime", &tt, resultbuf)) > > return resultbuf; > > > which is actually a behaviour changing, rather than just an > > optimization, when there's a lot of equivalently scoring timezones. > > Sure, that is intentionally a behavior change in this situation. > The theory is that if "Etc/UCT" is what the user put in /etc/localtime, > then that's the spelling she wants. See 23bd3cec6. Right, I'm not complaining about that. I'm just noting that that explains the cross-version divergence. Note that on 11 I *do* end up with some *other* timezone with the newer timezone data: $cat /etc/timezone;ls -l /etc/localtime Etc/UTC lrwxrwxrwx 1 root root 27 Jun 6 17:02 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC $ rm -rf /tmp/tztest;~/build/postgres/11-assert/install/bin/initdb /tmp/tztest 2>&1|grep -v 'scores 0'|grep -v 'uses leap seconds';grep timezone /tmp/tztest/postgresql.conf ... TZ "Zulu" gets max score 5200 TZ "UCT" gets max score 5200 TZ "Universal" gets max score 5200 TZ "UTC" gets max score 5200 TZ "Etc/Zulu" gets max score 5200 TZ "Etc/UCT" gets max score 5200 TZ "Etc/Universal" gets max score 5200 TZ "Etc/UTC" gets max score 5200 TZ "localtime" gets max score 5200 TZ "posix/Zulu" gets max score 5200 TZ "posix/UCT" gets max score 5200 TZ "posix/Universal" gets max score 5200 TZ "posix/UTC" gets max score 5200 TZ "posix/Etc/Zulu" gets max score 5200 TZ "posix/Etc/UCT" gets max score 5200 TZ "posix/Etc/Universal" gets max score 5200 TZ "posix/Etc/UTC" gets max score 5200 ok ... log_timezone = 'UCT' timezone = 'UCT' #timezone_abbreviations = 'Default' # Select the set of available time zone # share/timezonesets/. As you can see the switch from Etc/UTC to UCT does happen here (presumably in any branch before 12). Which did not happen before the import of 2019a / when using a system tzdata that's before that. There you get: TZ "Zulu" gets max score 5200 TZ "Universal" gets max score 5200 TZ "UTC" gets max score 5200 TZ "Etc/Zulu" gets max score 5200 TZ "Etc/Universal" gets max score 5200 TZ "Etc/UTC" gets max score 5200 ok and end up with UTC as the selection. I do think that < 12 clearly regressed here, although it's only exposing previous behaviour further. Greetings, Andres Freund