PGMQ vs Redis
PGMQ: An SQS-style message queue implemented as a lightweight Postgres extension. Redis: The in-memory data structure server that became the default cache, now with search, JSON and vectors built in.
key differences
- PGMQ is primarily a relational database; Redis is key-value.
- Licensing: PGMQ is open source (permissive) (PostgreSQL License); Redis is open source (copyleft) (Tri-license: AGPLv3, RSALv2 or SSPLv1 (Redis 8+)).
- Redis is built for larger datasets (≤ 10 TB) than PGMQ (≤ 100 GB).
- Horizontal scaling is none in PGMQ and native in Redis.
- Transactions: PGMQ offers full ACID; Redis offers limited.
- Only Redis has secondary indexes, full-text search, vector search, geospatial, stored procedures.
choose pgmq for
- +Background job queues for Postgres-backed apps
- +Outbox pattern without a separate broker
- +Lightweight task queues on Supabase
best at · Queue
choose redis for
- +Application and database query caching
- +Session storage and user tokens
- +Rate limiting and distributed locks
- +Leaderboards and counters
best at · Cache, Sessions, Queue
PGMQ vs Redis: FAQ
What is the difference between PGMQ and Redis?
PGMQ: An SQS-style message queue implemented as a lightweight Postgres extension. Redis: The in-memory data structure server that became the default cache, now with search, JSON and vectors built in. PGMQ is primarily a relational database; Redis is key-value. Licensing: PGMQ is open source (permissive) (PostgreSQL License); Redis is open source (copyleft) (Tri-license: AGPLv3, RSALv2 or SSPLv1 (Redis 8+)). Redis is built for larger datasets (≤ 10 TB) than PGMQ (≤ 100 GB).
When should I choose PGMQ over Redis?
Choose PGMQ for background job queues for Postgres-backed apps, outbox pattern without a separate broker and lightweight task queues on Supabase. Choose Redis for application and database query caching; session storage and user tokens; and rate limiting and distributed locks.
Is PGMQ or Redis more popular?
Redis ranks #2 on the WhichDB Score (84.3/100) and PGMQ ranks #145 (21.1/100). Popularity is not fit: check the requirements that matter for your project.
Are PGMQ and Redis open source?
Yes. PGMQ is open source. License: PostgreSQL License. Yes. Redis is open source. License: Tri-license: AGPLv3, RSALv2 or SSPLv1 (Redis 8+).