PgQue v0.1 - Zero-bloat Postgres queue

Posted on 2026-05-02 by PostgresAI
Related Open Source

PgQue v0.1 has been released.

PgQue is a zero-bloat Postgres event/message queue implemented in pure SQL and PL/pgSQL. It brings the PgQ architecture, originally developed at Skype, to modern Postgres environments, including managed Postgres platforms where PgQ is not included in the list of supported extensions.

PgQue uses snapshot-based batching and table rotation instead of SKIP LOCKED plus DELETE/UPDATE hot paths. This avoids the dead tuples, VACUUM pressure, index bloat, and performance drift that many in-database queues hit under sustained load.

Highlights:

  • Pure SQL / PL/pgSQL install: one SQL file, no C extension
  • Works on PostgreSQL 14-18
  • Designed for managed Postgres: RDS, Aurora, Cloud SQL, AlloyDB, Supabase, Neon, and similar platforms
  • Zero bloat in the main queue path by design
  • Multiple independent consumers over a shared event log
  • Built-in retry handling and dead-letter queue support
  • Optional pg_cron integration for ticking (recommended), or use an external scheduler

PgQue is best suited for durable event streams and message queues inside Postgres where stability under sustained load matters more than single-digit-millisecond dispatch latency. The default design typically delivers events in the 1-2 second range, while the SQL function calls themselves remain lightweight.

Repository and documentation:

https://github.com/NikolayS/pgque

Discussion on Hacker News:

https://news.ycombinator.com/item?id=47817349