002_types.pl fails on some timezones on windows
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org
Cc: Peter Eisentraut <peter_e@gmx.net>, Petr Jelinek <petr@2ndquadrant.com>
Date: 2021-09-30T18:36:41Z
Lists: pgsql-hackers
Hi,
CI showed me a failure in 002_types.pl on windows. I only just now noticed
that because the subscription tests aren't run by any of the vcregress.pl
steps :(
It turns out to be dependant on the current timezone. I have just about zero
understanding how timezones work on windows, so I can't really interpret why
that causes a problem on windows, but apparently not on linux.
The CI instance not unreasonably runs with the timezone set to GMT. With that
the tests fail. If I set it to PST, they work. For the detailed (way too long)
output see [1]. The relevant excerpt:
tzutil /s "Pacific Standard Time"
...
timeout -k60s 30m perl src/tools/msvc/vcregress.pl taptest .\src\test\subscription\ || true
t/002_types.pl ..................... ok
..
tzutil /s "Greenwich Standard Time"
timeout -k60s 30m perl src/tools/msvc/vcregress.pl taptest .\src\test\subscription\ || true
..
# Failed test 'check replicated inserts on subscriber'
# at t/002_types.pl line 278.
# got: '1|{1,2,3}
...
# 5|[5,51)
# 1|["2014-08-04 00:00:00+02",infinity)|{"[1,3)","[10,21)"}
# 2|["2014-08-02 01:00:00+02","2014-08-04 00:00:00+02")|{"[2,4)","[20,31)"}
# 3|["2014-08-01 01:00:00+02","2014-08-04 00:00:00+02")|{"[3,5)"}
# 4|["2014-07-31 01:00:00+02","2014-08-04 00:00:00+02")|{"[4,6)",NULL,"[40,51)"}
...
# expected: '1|{1,2,3}
...
# 1|["2014-08-04 00:00:00+02",infinity)|{"[1,3)","[10,21)"}
# 2|["2014-08-02 00:00:00+02","2014-08-04 00:00:00+02")|{"[2,4)","[20,31)"}
# 3|["2014-08-01 00:00:00+02","2014-08-04 00:00:00+02")|{"[3,5)"}
# 4|["2014-07-31 00:00:00+02","2014-08-04 00:00:00+02")|{"[4,6)",NULL,"[40,51)"}
...
Greetings,
Andres Freund
[1] https://api.cirrus-ci.com/v1/task/5800120848482304/logs/check_tz_sub.log
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