PgQue: Two Snapshots and a Diff
Summary
PgQue: Two Snapshots and a Diff explains how PgQue implements a zero-update in-database queue by reading events, using MVCC snapshots to compute visibility, and rotating event tables to avoid dead tuples. It covers the tick mechanism and SQL strategies that let multiple consumers fan out without locking, and discusses the trade-offs in end-to-end latency. The article positions PgQue as closer to a Kafka-like log than a traditional message queue and highlights general lessons about using pg_snapshot and pg_visible_in_snapshot for idempotent processing across readers.