Sizing a PostgreSQL Queue Table by Its Live Set
On a queue table, an index and an autovacuum threshold that grow with the table scale wrong; the measured case for sizing both to the pending jobs
Tag
8 entries: Note, System, Essay.
On a queue table, an index and an autovacuum threshold that grow with the table scale wrong; the measured case for sizing both to the pending jobs
Should a job run inside the HTTP request or go to a queue? The decision line, drawn through response time and fault tolerance
Naive replay re-poisons the queue or double-fires side effects. The safe shape: reset, dry-run, sandbox-first, select.
A message's data is an untyped contract the queue won't check. Validate it at the edge: producer before publish, consumer as a safety net.
At-least-once delivery means a handler will see the same message twice. The idempotency key, where it comes from, and the dedupe that survives a crash
You can't change a cross-service contract atomically. The rule: additive is safe, a breaking change needs a new identity — consumers upgrade first
Generating legally sequential, gap-free numbers with parallel workers: the JIT reservation pattern that solves race conditions and gaps together
Laravel queue workers are flawless locally and slow in production. The five most common reasons developers overlook.