Shrinking Infrastructure: Task Queues on PostgreSQL by Jan Bjørge | PyConSe | 2025

PyCon Sweden
88 views •

Most Python teams already run PostgreSQL—but when it comes to background jobs, they often add Redis, RabbitMQ, or Celery on top. pgqueuer takes a different approach: it turns Postgres itself into a complete task queue. At its core, pgqueuer uses simple tables to capture jobs and their metadata. Workers safely lease jobs with FOR UPDATE SKIP LOCKED, a Postgres feature that enables concurrent consumers without collisions. Idle workers wake instantly on new jobs via LISTEN/NOTIFY, while a fallback polling loop ensures progress even if notifications are lost. On top of this foundation, pgqueuer adds the pieces needed in production: exactly-once dequeueing, heartbeats and cancellation for long-running tasks, and retry semantics for failure recovery. A built-in CLI dashboard provides live insight into throughput, latency, and error counts—no extra services required. This talk walks through pgqueuer’s design and shows how PostgreSQL features can form a reliable, observable job system. Attendees will leave with a understanding of how to run production-ready background jobs directly on the database they already trust. #pyconse #pyconse2025

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close