Switch to archive_library without stopping archiving
Setting archive_library while archive_command was still set killed the archiver outright, FATAL: both "archive_command" and "archive_library" set, yet pg_stat_archiver held at archived 35 / failed 0 while the .ready backlog grew. Clearing archive_command drained it and archived 39.
Problem
What you're actually looking at
The symptom as it shows up on a real server.
An archive module replaces the per-segment shell fork that archive_command needs, so moving to archive_library is a sensible performance change. The trap is that the two settings are mutually exclusive, and setting the new one without clearing the old one does not fall back or warn, the archiver process exits fatally and is restarted forever. Nothing archives, and the counter everyone monitors does not move at all, because a failure is only counted once an archive attempt has been made.
Meridian adopts an archive module for throughput, sets archive_library, reloads, and sees no errors on the dashboard. WAL begins accumulating in pg_wal while pg_stat_archiver reports zero failures.
Simple terms
PostgreSQL can hand finished WAL files to a shell command or to a loadable module, and it refuses to do both. If you switch on the module while the old command is still configured, the process whose job is archiving dies on startup, over and over. Nothing is archived. The counter that says how many archives failed stays at zero, because failing requires having tried, and it never gets that far. The only thing that moves is the queue of files waiting to be archived, which is also the thing that eventually fills your disk.
Full runbook for this incident
- The full identify checklist, the exact signals that tell you it's this incident
- Every diagnostic query; lab output is attached only to the steps we actually captured
- The resolution path and the pitfalls that make it worse
- Mitigation steps to stop it recurring, plus a verify-you're-done query
Card required. Cancel before day 7 and you are not charged.
More in this category
Other Backup & recovery runbooks
Neighbouring incidents that share the same diagnostic surface.
Connected
How this connects to the rest of the library
A live view of this page's real cross-references, what explains it, what fixes it, what to tune, and where to go next. Every link is an authored relationship, not a guess.
Fixes these errors
Need the full procedure?
Pro runbooks finish the incident path
Free runbooks teach the shape. Pro opens the full step transcript, edge cases, and prevention depth.