finds.dev← search

// the find

timgit/pg-boss

★ 3,785 · TypeScript · MIT · updated Jul 2026

Queueing jobs in Postgres from Node.js like a boss

pg-boss is a job queue that runs entirely inside your existing PostgreSQL database, using SKIP LOCKED for exactly-once delivery. No Redis, no RabbitMQ, no separate infrastructure — if you're already on Postgres, you get a production-grade queue by adding one npm package. The target audience is Node.js teams who want background job processing without operational overhead.

SKIP LOCKED usage is the right call here — Postgres has had this since v9.5 and pg-boss uses it correctly to avoid polling contention without needing advisory locks. ORM adapter support for Drizzle, Prisma, Knex, and Kysely means you can enqueue a job inside the same transaction as your DB write, which is the only safe way to avoid lost jobs. The queue storage policies (rate limiting, debouncing, strict FIFO by key) cover real production use cases that most queues ignore until someone needs them badly. The test suite is genuinely large — 60+ test files covering multi-master, concurrency edge cases, PGlite, and distributed backends.

The library manages its own schema inside your application database, which means pg-boss migrations run at startup — this is a foot-gun in production environments with migration controls or read-only deploy users. There's no native TypeScript support for job payload types flowing through to worker handlers without manual type assertions; you get `data: object` and cast it yourself. LISTEN/NOTIFY low-latency delivery is opt-in and not the default, so unless you configure it, workers are polling on an interval — fine for most cases, but surprising when you expect sub-second delivery. The PGlite in-process mode is listed as a feature but the docs are thin on its production limitations, and anyone who ships it in a serverless function thinking it persists state will have a bad time.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →