CIOPages

PostgreSQL vs Redis

PostgreSQL is a relational database that writes every committed transaction to disk. Redis is an in-memory data store that keeps the whole data set in memory. This comparison sets them side by side on six aspects and says which job suits each.

Redis's documentation describes running it beside a disk-based database as a common design. PostgreSQL holds the records. Redis holds an in-memory copy of a subset of them, or small, write-heavy data such as counters.

Prices and other facts are as of October 29, 2026. Vendors change prices; confirm them on the vendor’s own pricing page. Independent analysis: neither project nor any vendor named here paid for or reviewed this page.

The short answer

Choose PostgreSQL when

  • the data is the system of record and a committed write must survive a crash
  • queries join tables, or analysts and BI tools need SQL
  • the data set is larger than the memory you want to pay for

Choose Redis when

  • reads must come from memory, in front of a slower database
  • the data is counters, sessions, rate limits or leaderboards
  • consumers need a stream with acknowledgments and redelivery

Who makes each

PostgreSQL comes from the POSTGRES project at the University of California, Berkeley, which began in 1986. It took the name PostgreSQL in 1996. The PostgreSQL Global Development Group holds its copyright.

Salvatore Sanfilippo created Redis in 2009. The company Redis Labs renamed itself Redis in August 2021. It is based in San Francisco, Rowan Trollope is its CEO, and it sells Redis Cloud and Redis Software.

After Redis changed its license in March 2024, the Linux Foundation launched Valkey, a fork of Redis 7.2.4 under the BSD 3-clause license. AWS, Google Cloud, Oracle, Ericsson and Snap backed it at launch.

Six differences that decide it

Compared as of PostgreSQL 18 and the Redis Open Source 8 release series, with list prices as of October 2026. PostgreSQL 19 reached its first release candidate on October 15, 2026.

Durability and transactions

PostgreSQL

A commit is reported only after its write-ahead log record is on disk. A transaction applies completely or not at all, and ROLLBACK cancels it.

Redis

Persistence is a setting: RDB snapshots, an append-only file (AOF), both, or none. AOF with the default fsync every second can lose 1 second of writes. MULTI and EXEC run commands in order without rollback; if one fails, the rest still run.

PostgreSQL protects every committed write by default; Redis lets you trade durability for speed.

Data model and querying

PostgreSQL

Tables queried in SQL, with joins, JSON columns and built-in full-text search.

Redis

Keys holding strings, hashes, lists, sets, sorted sets, streams, JSON and more, read and written with commands. Redis Search, called the Redis Query Engine in the Redis 8 announcement, adds secondary indexes, full-text, geospatial and vector queries on hashes and JSON.

Ad hoc questions across many records suit SQL; known access patterns by key suit Redis.

Caching

PostgreSQL

An unlogged table skips the write-ahead log and is considerably faster to write. It is truncated after a crash and is not copied to standby servers.

Redis

Set maxmemory and an eviction policy, such as allkeys-lru, and Redis drops keys to stay under the limit. Redis Data Integration, part of Redis's commercial products, copies changes from PostgreSQL 10 to 18 into Redis.

Redis is built to be a cache in front of PostgreSQL; unlogged tables suit a small cache that can be lost.

Pub/sub and queues

PostgreSQL

LISTEN and NOTIFY deliver events to listening sessions when the sending transaction commits. Payloads must be shorter than 8,000 bytes by default. SELECT ... FOR UPDATE SKIP LOCKED lets several workers take jobs from a queue table.

Redis

Pub/Sub delivers each message at most once; a subscriber that misses it loses it. Streams persist messages, and consumer groups track unacknowledged entries for at-least-once delivery.

A job that must commit with the data fits PostgreSQL; a separate, high-volume stream fits Redis.

Vector search

PostgreSQL

The pgvector extension adds HNSW and IVFFlat indexes. It indexes up to 2,000 dimensions for vector and 4,000 for halfvec. Embeddings get the same transactions, joins and point-in-time recovery as other rows.

Redis

Redis Search indexes vectors with FLAT, HNSW or SVS-VAMANA and combines them with text, tag, numeric and geospatial filters. Vector sets, added in Redis 8.0, store vectors in a key and return the most similar elements.

pgvector keeps embeddings beside the source rows; Redis serves vector queries from memory.

License and managed services

PostgreSQL

The PostgreSQL License, a permissive open-source license. Offered as Amazon RDS for PostgreSQL, Cloud SQL for PostgreSQL and Azure Database for PostgreSQL.

Redis

Redis 8 is under RSALv2, SSPLv1 or AGPLv3, at the user's choice. Redis 7.4 is RSALv2 or SSPLv1; 7.2 and earlier are BSD-3-Clause. Redis Cloud runs on AWS, Google Cloud and Azure: Free, $0 for 30 MB; Essentials, from $5 per month; Pro, from $0.014 per hour with a $200 monthly minimum. US list price as of October 2026. Amazon ElastiCache offers Valkey and Redis OSS, Google Cloud offers Memorystore for Valkey and for Redis, and Microsoft offers Azure Managed Redis, built in partnership with Redis.

PostgreSQL carries no license question; for Redis, check which version and license your cloud service runs.

Can PostgreSQL do Redis's job, or Redis do PostgreSQL's?

Partly, in both directions. PostgreSQL has unlogged tables for caches, SKIP LOCKED for job queues and LISTEN/NOTIFY for events. Redis can persist every write with an append-only file and act as a document database through Redis Search. Redis's own documentation says to enable both RDB and AOF for data safety comparable to PostgreSQL's. Test the replacement at your peak load before dropping either.

Which fits your situation

Product or account pages that read the same rows thousands of times

Both. Keep the rows in PostgreSQL and cache them in Redis with a memory limit and allkeys-lru.

Background jobs created by the same transaction as an order

PostgreSQL. The job row commits with the order, and workers claim jobs with SKIP LOCKED.

An event feed read by several services at their own pace

Redis Streams. Consumer groups track what each service has acknowledged and let it retry the rest.

Semantic search over documents already in PostgreSQL

pgvector, so embeddings stay in the same transactions and backups as the documents. Add Redis Search when queries must be served from memory.

Quick answers

Is Redis a replacement for PostgreSQL?

Not usually. Redis keeps the whole data set in memory, so the data cannot be larger than memory. With the append-only file on its default fsync policy, a crash can lose 1 second of writes.

Is Redis open source?

From Redis 8, yes, under AGPLv3, which the Open Source Initiative approves. RSALv2 and SSPLv1 remain options. Redis 7.4 is under RSALv2 or SSPLv1 only.

Does PostgreSQL LISTEN/NOTIFY keep messages for later?

No. NOTIFY reaches sessions that have already run LISTEN on that channel. For messages that wait until a consumer reads them, use a queue table or Redis Streams.

Sources

Keep reading

Buyer Guide
Operational Database Platforms
Toolkits
Frameworks and templates

Capability models, architecture templates and IT strategy tools to download.

Research
Pricing transparency in enterprise software

Which vendors publish their prices, and what that tells a buyer.