SQLite to Postgres in 6 days: 87GB→38GB, p99 363ms→51ms, 24M rows moved 3 times
JeremyCMorgan · x · 2026-12-01
Agent Swarm co-founder Taras Yarema logs a six-day AI-agent-driven migration from SQLite to PostgreSQL. SQLite was a deliberate early choice (single file, easy deploys), but the database grew to 87 GB, single long statements stalled the API, and every in-process SQLite driver on Bun blocks the event loop. Founders set four rules on one call: keep both engines (DATABASEURL switches, default unchanged), keep raw SQL behind a thin storage interface with no ORM, no phased plan — one goal for the swarm, and all E2E tests must pass on both engines. Results: 24M rows copied three times, production cutover at 01:44 with the first error at 01:46, disk usage 87 GB→38 GB, p99 latency at 5x load 363 ms→51 ms. Surprises included 9,423 stored values Postgres rejected and a hidden 64 MB shared-memory cap in the prod container.
More from coding & agent
- AI product building is splitting: most never customize models, a few tweak weights and architectures — sarahcat21 · 2026-12-01
- Perplexity CEO: p90 Employees Use 141 Agent-Hours Weekly, 8x in Two Months — AravSrinivas · 2026-12-01
- Pro animator trains Claude with 24B tokens to do Minecraft animation in 20 min vs 7 hours — Soft-Flower-456 · 2026-12-01
- SpecStory's agents push straight to main because the team can't review fast enough — hugobowne · 2026-12-01
- Micro Managers Anonymous: 'I lasted twelve seconds without checking on my agent' — hugobowne · 2026-12-01
- Simon Willison: four parallel coding agents, wiped out by 11 AM — 'using them well takes every inch of my 25 years' — hugobowne · 2026-12-01