PostgreSQL for AI:
one database for
data and vectors.
Build RAG, semantic search, and recommendations with pgvector. Keep embeddings and application data together in Postgres.
PostgreSQL for AI · pgvector · PostgreSQL 16–18 · NVMe · EU + US-East + Singapore
At a glance
- pgvector
- pre-installed on every database
- < 4 ms
- p50 vector search on NVMe
- $29/mo
- dedicated, fixed pricing
- EU
- Hosted in Germany · GDPR-ready
Every benchmark is measured with pgvector-bench and reproducible. We never publish invented QPS.
Why run AI on PostgreSQL
The database your app already trusts, now doing vector search.
One database for app data and vectors
Store embeddings beside your data. Filter, join, and update everything in one transaction.
Why managed Postgres for AI →pgvector on NVMe, tuned for RAG
Local NVMe and tuned pgvector keep retrieval fast. See the measured benchmarks for workload conditions.
NVMe vs cloud SSD benchmarks →Production-ready by default
Backups, recovery, and monitoring are included. Add nodes when you need automatic failover.
PostgreSQL high availability →PostgreSQL vs dedicated vector databases
Where keeping vectors in Postgres wins, and where a specialized store still fits.
| PostgreSQL (Rivestack) | Pinecone | Weaviate | Vector add-on | |
|---|---|---|---|---|
| Data model | Vectors + relational rows in one DB | Vectors only | Vectors + limited metadata | Vectors bolted onto shared Postgres |
| Filters & joins | Native SQL (WHERE, JOIN, RLS) | Metadata filters only | GraphQL filters | SQL, but on shared storage |
| Sync overhead | None, single source of truth | Dual-write to keep in sync | Dual-write to keep in sync | None |
| Storage | Dedicated local NVMe | Managed cloud | Managed cloud | Shared cloud block storage |
| Pricing model | Fixed per node, from $29/mo | Usage-metered | Usage-metered | Plan + compute add-ons |
| Best fit | RAG, search & recs with relational context | Pure vector search at huge scale | Vector-native apps | Prototypes outgrowing the free tier |
From zero to RAG in three steps
Create a database in 30 seconds
Choose a region and node size. pgvector and pgvectorscale arrive enabled.
Store embeddings next to your data
Add a vector column and insert embeddings from your preferred model.
Retrieve with SQL for RAG
Create an HNSW index. Search with your existing SQL filters and joins.
Pricing: fixed, from $29 to scale
One price per node. No per-query or per-vector billing.
Prices shown are EU Central, our lowest region. US-East and Singapore are higher. Full pricing.
Your own single-tenant VM for small production AI apps. Never deleted.
- 1 vCPU · 2 GB RAM
- 30 GB NVMe storage
- ~300K vectors (1536d)
- Daily backups + 7d PITR
- Never deleted
Production dedicated PostgreSQL with HA-ready architecture.
- 2 vCPU · 4 GB RAM per node
- 55 GB NVMe storage
- HA-ready (Patroni failover)
- Daily backups + 14d PITR
- Monitoring dashboard
More compute and storage for larger embedding sets.
- 4 vCPU · 8 GB RAM per node
- 135 GB NVMe storage
- ~600K vectors (1536d)
- Priority support
High-performance PostgreSQL for demanding AI workloads.
- 8 vCPU · 16 GB RAM per node
- 295 GB NVMe storage
- ~1M vectors (1536d)
- Custom PostgreSQL config
PostgreSQL for AI FAQ
What teams ask before building AI features on Postgres.
Yes. pgvector adds embedding storage and similarity search for RAG, recommendations, and semantic search. Your filters and joins stay in SQL.
Postgres is a good fit when vectors belong beside users, documents, and permissions. A dedicated vector database may suit much larger datasets or pure vector workloads.
Index memory is the main limit. Our measured capacity for 1536 dimensions is roughly 300K vectors on 4 GB, 600K on 8 GB, and 1M on 16 GB. Larger sets can spill to disk and slow down. Benchmark your own data before choosing a plan.
Use any model that produces compatible vectors. Match the column dimension to its output; multiple embedding columns can support different models.
Store the vector on the same row as its content and update both in one transaction. There is no separate database to synchronize.
Yes. Combine vector similarity with SQL filters, joins, and indexes for tenant, language, date, or other metadata.
Vector search relies on random reads when an index exceeds memory. Local NVMe reduces storage latency. See the benchmark report for measured recall, throughput, and latency.
Yes. PostgreSQL sources use standard migration tools. Pinecone requires exporting embeddings and mapping metadata to SQL columns. We help plan the migration.
Yes. Both provide PGVector integrations. Use your Rivestack connection string, or query directly with SQL when needed.
Solo starts at $29/month, including pgvector, NVMe, and daily backups. New customers get 7 days free with a card. Queries and vectors are not metered.
PostgreSQL + AI guides
Deeper reads on building AI features on Postgres.
Why managed PostgreSQL is the best choice for AI workloads
The case for one transactional database over a separate vector store, and what to size for in production.
Building RAG with pgvector and OpenAI
A practical walkthrough: embeddings, an HNSW index, and retrieval with metadata filters in plain SQL.
pgvector vs Pinecone
When PostgreSQL is the right home for your vectors, and when a dedicated vector database still wins.
Looking for hosted vector search specifically? See managed pgvector, managed PostgreSQL, and the pgvector guide.