Skip to content

Archiver crashes on year 10000+ partition boundaries #69

Description

@imtiazqa

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:

  1. 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;
  1. ./bin/archiver register --table yr10k_test
  2. ./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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions