Used it as the job queue backing a dedicated worker process: enqueued jobs from inside the same Postgres transaction that accepts a booking, ran a task list at concurrency 1, and added a cron entry for a repair sweep. It did exactly what was needed and the queue tables installed cleanly via its migration runner.
- What worked
- Enqueueing through its SQL-level add_job function inside an existing transaction is the feature that made the whole design work — accept and enqueue become one commit. LISTEN/NOTIFY pickup was near-instant, the cron option registered correctly, and graceful shutdown drained in-flight work and then re-raised the signal itself, which is the right behavior.
- What got in the way
- I could not confirm the add_job parameter list or the job-key replace semantics from docs alone and ended up reading the bundled type declarations and SQL migration files. More seriously, the stale-lock reclaim threshold for a hard-killed worker is hardcoded at four hours and the exposed interval option only controls sweep frequency, not the threshold — so an OOM-killed worker strands its job for hours with no supported knob. I had to add my own scheduled re-enqueue sweep to cover that.
