pgvector
github.comdatabaseself-hosted
pgvector is a self-hosted database in the Retrieval & Vector Stores layer of the AI stack. Vector similarity search as a Postgres extension.
By Lattice editorial · Facts verified · method
- licence
- PostgreSQL
- language
- SQL
- cost
- free
- owned by
- Data & Retrieval
Verified 2026-09build refuses it from 2027-04
Use pgvector when
Under a few million vectors, or when retrieval joins rows you already have.
Skip pgvector when
Vector search has become the workload rather than a side feature.
Holds the embeddings, returns the few that matter. — that is what this layer of the stack is answerable for. See the full Retrieval & Vector Stores section for the rest of the options.
Visit github.comCompare with another toolBadge this entry
[](https://lattice.kunjshah.in/retrieval-vector-stores/pgvector)Quick answers
- Is pgvector open source?
- Yes. pgvector is open source under the PostgreSQL licence. It is free to use.
- What are the alternatives to pgvector?
- The closest alternatives to pgvector are Qdrant, Milvus and Weaviate.
Compared in
- pgvector vs Qdrant vs Pinecone vs ChromaVector stores compared on hybrid search, filtering, operational burden and when the honest answer is that you should not add one at all.
- Retrieval vs fine-tuning vs prompt optimisation: fixing wrong answersThree layers that each claim to fix wrong answers, compared on what they actually change, what they need from you, and which failure each one is for.
Reading on retrieval
Alternatives to pgvector
compare 3 →Listed as an alternative to
- QdrantQdrantRust vector database with rich filtering payloads.Use when Vector-first workloads with heavy metadata filtering at scale.Skip when You want no new datastore to operate.Apache-2.0 · self-hosted · free
- ChromaChromaEmbeddings database designed for fast prototyping.Use when Getting a prototype working in an afternoon.Skip when You need durability, scaling or concurrent writes.Apache-2.0 · self-hosted · free
- MilvusMilvusCloud-native vector database supporting billion-scale indexes.Use when Billion-scale indexes with a cloud-native deployment.Skip when You need a small, comprehensible system.Apache-2.0 · self-hosted · free
Also in retrieval
- QdrantQdrantRust vector database with rich filtering payloads.Use when Vector-first workloads with heavy metadata filtering at scale.Skip when You want no new datastore to operate.Apache-2.0 · self-hosted · free
- WeaviateWeaviateGraph-aware vector database with hybrid and multi-vector search.Use when Hybrid or multi-vector search with a graph-shaped data model.Skip when Your data is genuinely relational and joins matter more than vectors.BSD-3-Clause · self-hosted · free
- ChromaChromaEmbeddings database designed for fast prototyping.Use when Getting a prototype working in an afternoon.Skip when You need durability, scaling or concurrent writes.Apache-2.0 · self-hosted · free
- PineconePineconeFully managed vector database with serverless scaling.Use when Zero operational work, and vector search is not your core competence.Skip when Residency, cost predictability or a query language you control.proprietary · saas · usage-based
- MilvusMilvusCloud-native vector database supporting billion-scale indexes.Use when Billion-scale indexes with a cloud-native deployment.Skip when You need a small, comprehensible system.Apache-2.0 · self-hosted · free
- TurbopufferTurbopufferVector search engine tuned for high-recall retrieval workloads.Use when High-recall retrieval at volume, without operating the index yourself.Skip when You need to tune the index directly.proprietary · saas · usage-based
- UnstructuredUnstructuredPreprocessing library that partitions raw documents for indexing.Use when Partitioning messy documents into retrievable chunks before indexing.Skip when Your input is already structured.Apache-2.0 · self-hosted · free
- ElasticsearchElasticsearchBM25 plus dense vectors in one index, with hybrid ranking.Use when One index carrying BM25 and dense vectors, with ranking you can tune.Skip when You need a permissive licence — the Elastic licence is not OSI-approved.Elastic-License-2.0 · self-hosted · usage-based
- VespaVespaSearch engine built for ranking-heavy retrieval at scale.Use when Ranking-heavy retrieval where the ranking function is the product.Skip when You want a small, low-operations component.Apache-2.0 · self-hosted · free
- RerankersRerankersPurpose-built cross-encoders for the second retrieval stage.Use when A cross-encoder in the second retrieval stage, to lift precision cheaply.Skip when You have no way to measure whether recall actually improved.proprietary · saas · usage-based
- Jina AIJina AIMultimodal embeddings and a reranker behind one endpoint.Use when Multimodal embeddings and a reranker behind one endpoint.Skip when Embeddings must stay in-house.proprietary · saas · usage-based
- LangChain Text SplittersLangChain Text SplittersDocument loaders and splitters for the ingest stage.Use when Document loaders and splitters, if you are already in that ecosystem.Skip when Structure matters — fixed-size splitting is rarely the right boundary.MIT · self-hosted · free
- DoclingDoclingLayout-aware parsing that preserves table and heading structure.Use when Layout-aware parsing that preserves tables and heading structure.Skip when Your documents are plain text.MIT · self-hosted · free
- LlamaParseLlamaParseManaged parsing for PDFs, especially the ugly ones.Use when Managed parsing for PDFs, especially the ugly ones.Skip when Document contents cannot leave your infrastructure.proprietary · managed · usage-based