• Sources: primary, discussion
  • Summary: Cascading deletes from workflow_status to step_outputs touched scattered pages and churned the cache, so DBOS now deletes each table separately in creation order, with an anti-join that skips data from workflows that still exist. A created_at index lookup took 20 minutes when millions of dead tuples sat at the front of the index before autovacuum caught up. A manual VACUUM before and after each retention pass fixed it. DBOS rejected dropping partitions because long-running workflows would block them.
  • Why it matters: Teams running queue or workflow tables on Postgres can apply the same fixes: avoid ON DELETE CASCADE on hot paths, delete in physical order, and vacuum around oldest-first batch deletes.