The Wire · Showcase
PG-BOSS PATCHES STATEMENT TIMEOUT THAT KILLS MAINTENANCE JOBS AT SCALE
By RepoJournal · Filed · About Supabase
pg-boss just stopped keeling over when your job backlog grows, fixing a 30-second timeout that was nuking archive and purge operations in production.
The culprit: unbounded DELETE queries inside maintenance cycles that would hang indefinitely on tables with large backlogs [1]. The fix batches both operations with hard limits, wrapping the archive DELETE in a USING subquery with a 10,000-row cap per cycle and the purge DELETE with a 20,000-row cap [1]. This keeps transactions well under the 30-second statement_timeout set in the locked() wrapper, so your maintenance jobs actually finish instead of timing out and leaving dead jobs piling up [1]. If you're running pg-boss in production with accumulated job history, this is the patch that stops your database from gradually choking itself.
Action items
- → Upgrade pg-boss to latest and redeploy supabase/pg-boss [plan]
- → Monitor maintenance job logs for success after upgrade supabase/pg-boss [monitor]
References
- [1] fix: batch archive and purge queries to prevent statement timeout ↗ supabase/pg-boss
FAQ
- What changed in Supabase on May 17, 2026?
- pg-boss just stopped keeling over when your job backlog grows, fixing a 30-second timeout that was nuking archive and purge operations in production.
- What should Supabase teams do about it?
- Upgrade pg-boss to latest and redeploy • Monitor maintenance job logs for success after upgrade
- Which Supabase repositories shipped on May 17, 2026?
- supabase/pg-boss