Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVcxE-0004GU-Ce for pgsql-bugs@arkaria.postgresql.org; Mon, 04 May 2020 15:24:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jVcxD-0003tH-7u for pgsql-bugs@arkaria.postgresql.org; Mon, 04 May 2020 15:24:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVcxD-0003sH-1e for pgsql-bugs@lists.postgresql.org; Mon, 04 May 2020 15:24:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVcxA-00012I-BC for pgsql-bugs@lists.postgresql.org; Mon, 04 May 2020 15:24:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 044FOG4G005174; Mon, 4 May 2020 11:24:17 -0400 From: Tom Lane To: "Suhonen Reijo (Valtori)" cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: VS: BUG #16404: PostgreSQL 12.2: Database restore does not accept the EEST time zone. In-reply-to: <655f0323b3384929b18ca9ac42d08cdc@C119S212VM034.msvyvi.vaha.local> References: <16404-4603a99603fbd04c@postgresql.org> <21109.1588255724@sss.pgh.pa.us> <655f0323b3384929b18ca9ac42d08cdc@C119S212VM034.msvyvi.vaha.local> Comments: In-reply-to "Suhonen Reijo (Valtori)" message dated "Mon, 04 May 2020 07:26:19 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5172.1588605856.1@sss.pgh.pa.us> Date: Mon, 04 May 2020 11:24:16 -0400 Message-ID: <5173.1588605856@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Suhonen Reijo (Valtori)" writes: > postgresql.conf > restore_command = 'unxz -k < /srv/pgbackup/12/data/archive/%f.xz > %p' > recovery_target_time = '2020-05-04 09:54:30 EEST' > recovery_target_action = 'pause' Ah. I can reproduce it when I set recovery_target_time that way. The reason seems to be that while loading the config file for the first time, timezone_abbreviations hasn't been set yet, so the timestamp parser doesn't know any timezone abbreviations at all. It does work to use full time zone names (Europe/Helsinki, say) or of course you could use a numeric UTC offset. Another workaround is to explicitly set timezone_abbreviations before you set recovery_target_time in the config file (i.e., move and uncomment the timezone_abbreviations setting). But ugh. Maybe it's possible to fix this, but I don't really see any non-kluge way to do that. I'm inclined to just document that timezone abbreviations aren't accepted in this variable. Note for anybody trying to reproduce this: I was misled for awhile by the fact that a few abbreviations like "EST" *do* work. The reason turns out to be that the tzdata database has entries for those names, so that our code path for full time zone names successfully parses them after the abbreviations code fails to. regards, tom lane