PgQue is a zero-bloat Postgres message queue implemented in pure PL/pgSQL, requiring no C extensions or external daemons. It revives the battle-tested PgQ architecture (originally built at Skype) and makes it compatible with managed Postgres providers like RDS, Aurora, Supabase, and Neon. Instead of SKIP LOCKED with per-row DELETE/UPDATE (which causes dead tuples and VACUUM pressure), PgQue uses snapshot-based batching and TRUNCATE-based table rotation for zero bloat under sustained load. The trade-off is ~1–2 second end-to-end delivery latency. It supports native fan-out with independent consumer cursors, built-in retry with backoff, dead letter queues, and a language-agnostic SQL API. Client libraries exist for Python, Go, and TypeScript. Benchmarks show ~86k events/sec insert and ~2.4M events/sec consumer read rate with zero dead-tuple growth over 30 minutes.
Table of contents
ContentsWhy PgQueLatency trade-offComparisonInstallationRoles and grantsProject statusDocsQuick startClient librariesBenchmarksArchitectureContributingLicense3 Comments
Sort: