vs

PGMQ vs Valkey

PGMQ: An SQS-style message queue implemented as a lightweight Postgres extension. Valkey: The Linux Foundation's BSD-licensed fork of Redis, now the default engine on AWS and Google Cloud.

key differences

  • PGMQ is primarily a relational database; Valkey is key-value.
  • Valkey is built for larger datasets (≤ 10 TB) than PGMQ (≤ 100 GB).
  • Horizontal scaling is none in PGMQ and native in Valkey.
  • Transactions: PGMQ offers full ACID; Valkey offers limited.
  • Only PGMQ has json.
  • Only Valkey has geospatial, stored procedures, ttl / expiry, pub/sub, in-memory.

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 valkey for

  • +Replacing Redis OSS without license concerns
  • +Application caching and session storage
  • +Rate limiting, counters and leaderboards
  • +Pub/sub fan-out and Streams-based queues

best at · Cache, Sessions, Queue

overview
Primary model
Relational
Key-Value
Also supports
–
–
Type
Extension
Database engine
Status
Active
Active
Developer
PGMQ community (originally Tembo)
Valkey project (Linux Foundation)
First release
2023
2024
Latest version
1.13.1 (Oct 20, 2026)
9.1.3 (Oct 26, 2026)
License
Open source (permissive)PostgreSQL License
Open source (permissive)BSD 3-Clause
Free tier
✓
✓
popularity
WhichDB Score
21.1
58.0
Rank
#145
#16
GitHub stars
5.4K
27.5K
Stack Overflow questions
–
29
scale & guarantees
Comfortable data size
Small (≤ 100 GB)
Medium (≤ 10 TB)
Horizontal scaling
None
Native
Multi-region
None
Read replicas
ACID
Full
Limited
Consistency
Strong
Eventual
Schema
Strict
Schemaless
Architecture
Single node, Primary replica, Client server
In memory, Single node, Primary replica, Distributed, Client server
deployment
Self-hosted
✓
✓
Vendor-managed cloud
—
—
Serverless
—
—
Embedded
—
—
Edge
—
—
Clouds
AWS, Google Cloud, Azure
AWS, Google Cloud, Oracle Cloud, Aiven, DigitalOcean, Akamai
capabilities
Transactions
✓
✓
Joins
—
—
Secondary indexes
—
—
Full-text search
—
—
Vector search
—
—
Geospatial
—
✓
JSON
✓
—
Change data capture
—
—
Triggers
—
—
Stored procedures
—
✓
Materialized views
—
—
TTL / expiry
—
✓
Pub/Sub
—
✓
Columnar storage
—
—
In-memory
—
✓
Durable persistence
✓
✓
Compression
—
—
Encryption at rest
—
—
Role-based access
—
✓
Time travel
—
—
Branching
—
—
Online schema changes
—
—
Streaming ingest
—
✓
Offline sync
—
—
Runs in WebAssembly
—
—
interfaces
Query languages
SQL
Redis commands (RESP), Lua
Client languages
Python, Rust, JavaScript, Go, Java, C#, Elixir
Python, Java, JavaScript, Go, C#, Rust, Ruby, PHP
Best for
Queue
Cache, Sessions, Queue, Pub/Sub

PGMQ vs Valkey: FAQ

What is the difference between PGMQ and Valkey?

PGMQ: An SQS-style message queue implemented as a lightweight Postgres extension. Valkey: The Linux Foundation's BSD-licensed fork of Redis, now the default engine on AWS and Google Cloud. PGMQ is primarily a relational database; Valkey is key-value. Valkey is built for larger datasets (≤ 10 TB) than PGMQ (≤ 100 GB). Horizontal scaling is none in PGMQ and native in Valkey.

When should I choose PGMQ over Valkey?

Choose PGMQ for background job queues for Postgres-backed apps, outbox pattern without a separate broker and lightweight task queues on Supabase. Choose Valkey for replacing Redis OSS without license concerns; application caching and session storage; and rate limiting, counters and leaderboards.

Is PGMQ or Valkey more popular?

Valkey ranks #16 on the WhichDB Score (58.0/100) and PGMQ ranks #145 (21.1/100). Popularity is not fit: check the requirements that matter for your project.

Are PGMQ and Valkey open source?

Yes. PGMQ is open source. License: PostgreSQL License. Yes. Valkey is open source. License: BSD 3-Clause.