ParseBoundExpr uses Go's time.Parse with a fixed 4-digit year format. PostgreSQL returns "10000-06-01 00:00:00+00" for year 10000+ partition bounds. Go's parser rejects it, crashes the archiver, and skips all tables that come after it alphabetically.
Steps to reproduce:
- Create a partitioned table with a year 10000 partition:
CREATE TABLE public.yr10k_test (...) PARTITION BY RANGE (ts);
CREATE TABLE public.yr10k_test_p_10000_06 PARTITION OF public.yr10k_test
FOR VALUES FROM ('10000-06-01') TO ('10000-07-01');
INSERT INTO public.yr10k_test (ts, payload)
SELECT '10000-06-15 00:00:00+00', 'row-'||i FROM generate_series(1,50) i;
- ./bin/archiver register --table yr10k_test
- ./bin/archiver
Actual result:
[yr10k_test] archive cycle: ensure current partition: parse bounds for
yr10k_test_p_10000_06: parse lower bound: unrecognized timestamp format:
"10000-06-01 00:00:00+00"
Archiver exits 1.
Expected result:
Archiver handles year 10000+ partition bounds without crashing. Either archives the partition or skips it with a clear warning.
ParseBoundExpr uses Go's time.Parse with a fixed 4-digit year format. PostgreSQL returns "10000-06-01 00:00:00+00" for year 10000+ partition bounds. Go's parser rejects it, crashes the archiver, and skips all tables that come after it alphabetically.
Steps to reproduce:
Actual result:
[yr10k_test] archive cycle: ensure current partition: parse bounds for
yr10k_test_p_10000_06: parse lower bound: unrecognized timestamp format:
"10000-06-01 00:00:00+00"
Archiver exits 1.
Expected result:
Archiver handles year 10000+ partition bounds without crashing. Either archives the partition or skips it with a clear warning.