From: Tom Lane <tgl@sss.pgh.pa.us>
To: Suhonen Reijo (Valtori) <reijo.suhonen@valtori.fi>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: VS: BUG #16404: PostgreSQL 12.2: Database restore does not accept the EEST time zone.
Date: Mon, 04 May 2020 11:24:16 -0400
Message-ID: <5173.1588605856@sss.pgh.pa.us> (raw)
In-Reply-To: <655f0323b3384929b18ca9ac42d08cdc@C119S212VM034.msvyvi.vaha.local>
References: <16404-4603a99603fbd04c@postgresql.org>
<21109.1588255724@sss.pgh.pa.us>
<655f0323b3384929b18ca9ac42d08cdc@C119S212VM034.msvyvi.vaha.local>
"Suhonen Reijo (Valtori)" <reijo.suhonen@valtori.fi> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, reijo.suhonen@valtori.fi, 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: <5173.1588605856@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox