Steps to Reproduce:
- Create a partitioned table with timestamp (no tz) partition column:
CREATE TABLE public.ntz_test (
id bigint GENERATED ALWAYS AS IDENTITY,
created_at timestamp NOT NULL,
val text,
PRIMARY KEY (id, created_at)
) PARTITION BY RANGE (created_at);
CREATE TABLE public.ntz_test_p_2026_04 PARTITION OF public.ntz_test
FOR VALUES FROM ('2026-04-01') TO ('2026-05-01');
2. Register with archiver: ./bin/archiver register --table ntz_test --period monthly --hot-period "1 month" --retention "5 years"
3. Run archiver: ./bin/archiver --config cf.yaml
Expected: Archive completes successfully.
Actual:
[ntz_test] archive cycle: ensure current partition: parse bounds for ntz_test_p_2026_04:
parse lower bound: unrecognized timestamp format: "2026-04-01 00:00:00"
Root Cause:
internal/partition/partition.go:parseTimestamp() only accepts formats with a timezone offset (+00, -07) or plain date. PostgreSQL emits timestamp without time zone bounds as 2026-04-01 00:00:00 (no offset) — not matched by any supported layout.
Fix: Add "2006-01-02 15:04:05" to the supported layouts in parseTimestamp().
Steps to Reproduce:
CREATE TABLE public.ntz_test (
id bigint GENERATED ALWAYS AS IDENTITY,
created_at timestamp NOT NULL,
val text,
PRIMARY KEY (id, created_at)
) PARTITION BY RANGE (created_at);
CREATE TABLE public.ntz_test_p_2026_04 PARTITION OF public.ntz_test
FOR VALUES FROM ('2026-04-01') TO ('2026-05-01');
2. Register with archiver: ./bin/archiver register --table ntz_test --period monthly --hot-period "1 month" --retention "5 years"
3. Run archiver: ./bin/archiver --config cf.yaml
Expected: Archive completes successfully.
Actual:
[ntz_test] archive cycle: ensure current partition: parse bounds for ntz_test_p_2026_04:
parse lower bound: unrecognized timestamp format: "2026-04-01 00:00:00"
Root Cause:
internal/partition/partition.go:parseTimestamp() only accepts formats with a timezone offset (+00, -07) or plain date. PostgreSQL emits timestamp without time zone bounds as 2026-04-01 00:00:00 (no offset) — not matched by any supported layout.
Fix: Add "2006-01-02 15:04:05" to the supported layouts in parseTimestamp().