pgvector
Open-source vector similarity search for Postgres
If you already use Postgres, pgvector is the no-brainer choice for vector search—free, familiar SQL, and no extra database to manage. For massive scale (10B+ vectors) or fully managed serverless, consider dedicated options; but for the vast majority of applications, pgvector delivers exactly what you need.
- Adding semantic search to existing Postgres applications
- Building RAG pipelines on relational data
- Recommendation systems using Postgres data
- Teams wanting to avoid a separate vector database
- Extreme scale (10B+ vectors) — dedicated vector DBs better
- Fully managed serverless vector search auto-scaling needed
- High-cardinality metadata filtering beyond Postgres indexes
We scan live Reddit threads, YouTube comments, X posts, G2 reviews and other communities — and hand you an honest verdict in under a minute.
- Honest verdict, not marketing
- Real pros & cons from real users
- Attributed quotes with receipts
3 free scans · no card needed
Skip pgvector if you need a fully managed serverless vector database with auto-scaling, GPU acceleration, or plan to search beyond tens of billions of vectors.
pgvector is free and open-source — no licensing costs, usage tiers, or overages. The only cost is your existing Postgres infrastructure. Compare to Pinecone ($70+/month starter) or Weaviate (self-hosted server costs); pgvector is cheaper for any scale you can fit in Postgres.
In short
pgvector — Open-source vector similarity search for Postgres. Best for Adding semantic search to existing Postgres applications, Building RAG pipelines on relational data, Recommendation systems using Postgres data. Free to use.
Viability Score
How likely is pgvector to still be operational in 12 months? Based on 4 signals — momentum (how recently it shipped), wrapper dependency, revenue model, and web presence.
Last calculated: July 2026
How we score →Key Features
- Exact nearest neighbor search
- Approximate nearest neighbor search (HNSW, IVFFlat)
- Single-precision vectors
- Half-precision vectors
- Binary vectors
- Sparse vectors
- L2 distance
- Inner product
- Cosine distance
- L1 distance
- Hamming distance
- Jaccard distance
- Disk-based index for large datasets
- Quantization to reduce memory footprint
- Parallel IVFFlat index creation
About pgvector
pgvector is a PostgreSQL extension that enables vector similarity search directly within your existing Postgres database. Designed for teams that already use Postgres, it eliminates the need for a separate vector database by storing vectors alongside relational data. You query them with standard SQL operators: exact nearest neighbor search by default, or approximate search via HNSW and IVFFlat indexes. It supports multiple distance functions (L2, inner product, cosine, L1, Hamming, Jaccard) and vector types (single-precision, half-precision, binary, sparse). ACID-compliant with point-in-time recovery, JOINs, and aggregates like AVG(). Installation works through Git, Docker, Homebrew, and package managers on Linux, Mac, and Windows—and it's already bundled with many hosted Postgres providers. Recent versions (v0.8.5) add binary vectors, sparse vectors, disk-based indexes for large datasets, and quantization to reduce memory footprint. For most teams with moderate vector volumes (<10M), pgvector is the simplest path to vector search—no new infrastructure, zero cost, and full governance within Postgres.
Behind the Verdict
pgvector does one thing and does it well: bring vector search into Postgres without ripping out your existing stack. We like that it's truly open source (PostgreSQL license) and that you can start with exact search and switch to approximate indexes later. The HNSW index gives good speed-recall tradeoffs for most workloads, while IVFFlat is lighter on memory. Newer features like disk-based indexes let you handle datasets that don't fit in RAM, and quantization cuts memory usage. The caveat: if you're building at hyperscale (billions of vectors) or need fully managed serverless, pgvector isn't the right fit—Pinecone or Weaviate will serve you better. Also, metadata filtering isn't as advanced as dedicated vector DBs; you're limited to Postgres's own indexes. But for 90% of use cases—RAG pipelines, semantic search on product catalogs, recommendation engines on moderate datasets—pgvector is the pragmatic pick. Version 0.8.5 is stable, well-documented, and has a large community. Go with it if you want simplicity and cost control.
Researching pgvector? Get your full AI stack in 60 seconds.
Free, no signup — tell us your goal and get tools matched to your budget & existing stack.
Real-world workflow fit
Concrete scenarios for the personas pgvector actually fits — and what changes day-one when you adopt it.
You have a Postgres products table and want to find visually similar items using image embeddings.
Outcome: Install pgvector, add a vector column, store embeddings, and query with ORDER BY embedding <-> '[0.1,0.2,...]' LIMIT 10 — all within existing database.
You need to retrieve relevant document chunks based on user query embeddings.
Outcome: Store chunk embeddings in a pgvector column with HNSW index for fast approximate search; combine with metadata filters (e.g., date range) using WHERE clauses.
Use Cases
- Build semantic search for documents, images, or audio using embeddings.
- Power recommendation systems by finding similar user/item vectors.
- Enhance QA chatbots with retrieval-augmented generation (RAG).
- Combine vector search with relational filters (e.g., 'find similar products under $50').
- Perform anomaly detection by measuring distance between normal and anomalous vectors.
Limitations
- pgvector's performance is bounded by the underlying Postgres instance.
- Approximate nearest neighbor search may not match the speed of purpose-built vector databases.
- The extension does not provide managed infrastructure, replication, or scaling out-of-the-box — all that is left to the user's Postgres deployment.
- HNSW index builds can be slow on large datasets, and there is no native GPU acceleration or custom distance function support.
as of 2026-06-29
12-month cost
Project the real annual outlay, including the implied monthly cost when only an annual tier is published.
Vendor list price only. Add-on usage, seat overages, and contract minimums are surfaced under Hidden costs & gotchas.
Plans compared
For each published pgvector tier: who it actually fits, and what it adds vs. the previous tier. Cross-reference the cost calculator above for projected annual outlay.
Open Source
$0
Ideal for
Any developer or team that wants a free, self-managed vector search integrated into Postgres.
What this tier adds
Free and open-source; all features included with no restrictions.
Where the pricing makes sense
The company stage and team size where pgvector's pricing actually pencils out — and where peers do it cheaper.
pgvector is free and open-source — no licensing costs, usage tiers, or overages. The only cost is your existing Postgres infrastructure. Compare to Pinecone ($70+/month starter) or Weaviate (self-hosted server costs); pgvector is cheaper for any scale you can fit in Postgres.
Setup time & first value
How long it actually takes to get something useful out of pgvector — broken out by persona, not the marketing-page minute.
For an experienced Postgres admin: 15-30 minutes to clone, compile, install the extension, and create a test table. For less experienced users using Docker or Homebrew: 5-10 minutes. First query working within the hour.
Switching to or from pgvector
How to bring data in from common predecessors and how to get it back out — written for the switcher, not the buyer.
- →From FAISS/Annoy: Export vectors to CSV and load with COPY — requires some scripting but straightforward.
- ↗To Pinecone: Export vectors via COPY to CSV, then use Pinecone's bulk import API — plan for API rate limits.
- ↗To Weaviate: Similar export/import pattern; pgvector's COPY to CSV then Weaviate's bulk endpoint.
Integrations
Resources & Guides
- Resourcegithub.com
GitHub
Open-source vector similarity search for Postgres. Contribute to pgvector/pgvector development by creating an account on GitHub.
- Resourcegithub.com
GitHub
Open-source vector similarity search for Postgres. Contribute to pgvector/pgvector development by creating an account on GitHub.
- Resourcegithub.com
pgvector/README.md at master
Open-source vector similarity search for Postgres. Contribute to pgvector/pgvector development by creating an account on GitHub.
Official links
Tools that pair well with pgvector
Common stack mates teams adopt alongside pgvector, with the specific reason each pairing earns its keep.
Alternatives to pgvector
View allFrequently Asked Questions
Categories
Used pgvector? Help shape our editorial sentiment research.