Re: 002_types.pl fails on some timezones on windows
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers@postgresql.org, Peter Eisentraut <peter_e@gmx.net>, Petr Jelinek <petr@2ndquadrant.com>
Date: 2021-09-30T20:31:36Z
Lists: pgsql-hackers
Hi,
On 2021-09-30 16:03:15 -0400, Tom Lane wrote:
> I wrote:
> > ... sure enough, 002_types.pl
> > falls over with TZ=Africa/Casablanca on my Linux machine, too.
>
> Independently of whether Africa/Casablanca is a sane translation of
> that Windows zone name, it'd be nice if 002_types.pl weren't so
> sensitive to the prevailing zone. I looked into exactly why it's
> falling over, and the answer seems to be this bit:
> (2, tstzrange('Mon Aug 04 00:00:00 2014 CEST'::timestamptz - interval '2 days', 'Mon Aug 04 00:00:00 2014 CEST'::timestamptz), '{"[2,3]", "[20,30]"}'),
> (3, tstzrange('Mon Aug 04 00:00:00 2014 CEST'::timestamptz - interval '3 days', 'Mon Aug 04 00:00:00 2014 CEST'::timestamptz), '{"[3,4]"}'),
> (4, tstzrange('Mon Aug 04 00:00:00 2014 CEST'::timestamptz - interval '4 days', 'Mon Aug 04 00:00:00 2014 CEST'::timestamptz), '{"[4,5]", NULL, "[40,50]"}'),
>
> The problem with this is the blithe assumption that "minus N days"
> is an immutable computation. It ain't. As bad luck would have it,
> these intervals all manage to cross a Moroccan DST boundary
> (Ramadan, I assume):
For a minute I was confused, because of course we should still get the same
result on the subscriber as on the publisher. But then I re-re-re-realized
that the comparison data is a constant in the test script...
> What I'm inclined to do about that is get rid of the totally-irrelevant-
> to-this-test interval subtractions, and just write the desired timestamps
> as constants.
Sounds like a plan.
Greetings,
Andres Freund
Commits
-
Doc: improve timezone/README's recipe for tracking Windows zones.
- db692b0c8490 15.0 landed
-
Update our mapping of Windows time zone names some more.
- c1aa3b3c0d21 15.0 landed
- d0b0b70dc2a6 11.14 landed
- cd2479142588 10.19 landed
- c53ff69e1fd2 13.5 landed
- b5f34ae08ad2 9.6.24 landed
- 919c08d909f7 14.1 landed
- 07873a5dc925 12.9 landed
-
Update our mapping of Windows time zone names using CLDR info.
- dbec5a2fea4d 9.6.24 landed
- e323630cdd3c 10.19 landed
- 9cc919b51855 11.14 landed
- e5b25f19b37b 12.9 landed
- 9c76689de442 13.5 landed
- fa8db48791c5 14.1 landed
- 9b8d68cc6589 15.0 landed
-
Re-alphabetize the win32_tzmap[] array.
- 37cbe0f79129 9.6.24 landed
- cb0799db0d8e 10.19 landed
- bb6d426699a6 11.14 landed
- 4721e8aa6223 12.9 landed
- 7ba8eb81f6b7 13.5 landed
- 81464999bc92 14.1 landed
- ad740067aea5 15.0 landed
-
Remove gratuitous environment dependency in 002_types.pl test.
- d30d8257ec74 10.19 landed
- b46710dadf0c 11.14 landed
- f2cf745a038c 12.9 landed
- 649e561f65c5 13.5 landed
- afc6081f6ea8 14.1 landed
- 20f8671ef69b 15.0 landed