jsonb_jsonpath test fails after 2024-11-03
While working on reproducible builds for openSUSE, I found that
our postgresql17 package fails the jsonb_jsonpath test
when building after 2024-11-03 (the US DST change).
Background:
As part of my work on reproducible builds for openSUSE, I check that
software still gives identical build results in the future.
The usual offset is +16.1 years, because that is how long I expect some
software will be used in some places.
This showed up failing tests in our package build.
See https://reproducible-builds.org/ for why this matters.
Here is the test log:
# 1 of 221 tests failed.
# The differences that caused some tests to fail can be viewed in the
file
"/home/abuild/rpmbuild/BUILD/postgresql-17.0/src/test/regress/regression.diffs".
# A copy of the test summary that you see above is saved in the file
"/home/abuild/rpmbuild/BUILD/postgresql-17.0/src/test/regress/regression.out".
[...snipped...]
diff -U3
/home/abuild/rpmbuild/BUILD/postgresql-17.0/src/test/regress/expected/jsonb_jsonpath.out
/home/abuild/rpmbuild/BUILD/postgresql-17.0/src/test/regress/results/jsonb_jsonpath.out
---
/home/abuild/rpmbuild/BUILD/postgresql-17.0/src/test/regress/expected/jsonb_jsonpath.out
2024-09-23 20:02:53.000000000 +0000
+++
/home/abuild/rpmbuild/BUILD/postgresql-17.0/src/test/regress/results/jsonb_jsonpath.out
2040-11-25 10:30:31.159999999 +0000
@@ -2637,7 +2637,7 @@
select jsonb_path_query_tz('"12:34:56"', '$.time_tz().string()');
jsonb_path_query_tz
---------------------
- "12:34:56-07:00"
+ "12:34:56-08:00"
(1 row)
select jsonb_path_query('"12:34:56"', '$.time().string()');
+ exit 1
On Debian or openSUSE you can test it with
osc checkout openSUSE:Factory/postgresql17 && cd $_
osc build --vm-type=kvm --noservice --clean \
--build-opt=--vm-custom-opt="-rtc base=2024-11-04T00:00:00" standard
Tests should be designed to continue working into the far future.
Ciao
Bernhard M.
"Bernhard M. Wiedemann" <bwiedemann@suse.de> writes:
While working on reproducible builds for openSUSE, I found that
our postgresql17 package fails the jsonb_jsonpath test
when building after 2024-11-03 (the US DST change).
Many thanks for the report! This test case is indeed new since
the last DST change. We would have found out about it anyway
when the buildfarm went red this coming Sunday :-(, but with a
release deadline coming up fast, several extra days' notice is
hugely valuable.
Tests should be designed to continue working into the far future.
Sadly, anything to do with time zones is subject to the whims
of politicians, not to mention the IANA tzdb crew. So there's
only so much we can do.
regards, tom lane