002_types.pl fails on some timezones on windows

Поиск
Список
Период
Сортировка
От Andres Freund
Тема 002_types.pl fails on some timezones on windows
Дата
Msg-id 20210930183641.7lh4jhvpipvromca@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: 002_types.pl fails on some timezones on windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 002_types.pl fails on some timezones on windows  (Andrew Dunstan <andrew@dunslane.net>)
Re: 002_types.pl fails on some timezones on windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jean-Christophe Arnu
Дата:
Сообщение: Re: Empty string in lexeme for tsvector
Следующее
От: Robert Haas
Дата:
Сообщение: Re: when the startup process doesn't (logging startup delays)