Lattice
Skip to content

pgvector

databaseSelf-hostedgithub.com

pgvector is a self-hosted database in the Retrieval & Vector Stores layer of the AI stack. Vector similarity search as a Postgres extension.

By Facts verifiedmethod

Licence
PostgreSQL
Language
SQL
Cost
free
Owned by
Data & Retrieval

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. See every retrieval tool.

Badge this entry
Lattice badge: pgvector verified 2026-09
[![pgvector on Lattice: verified 2026-09](https://lattice.kunjshah.in/retrieval-vector-stores/pgvector/badge.svg)](https://lattice.kunjshah.in/retrieval-vector-stores/pgvector)

Rules of thumb

  • Most bad retrieval is a ranking or chunking problem, not a database problem. Fix the eval set and the chunks before you migrate stores.
  • Test filtered recall, not just recall. Metadata filters are where vector stores differ most and where demos never look.
  • Use the database you already run until it measurably fails. A second datastore is a second thing to back up, secure and page on.

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.

Ask an AI about this page

Opens the assistant with this page’s link and a question already filled in.

Compared in

Reading on retrieval

Alternatives to pgvector

compare 3 →

Listed as an alternative to

  • Qdrant
  • Chroma
  • Milvus

Also in retrieval

  • Qdrant
  • Weaviate
  • Chroma
  • Pinecone
  • Milvus
  • Turbopuffer
  • Unstructured
  • Elasticsearch
  • Vespa
  • Rerankers
  • Jina AI
  • LangChain Text Splitters
  • Docling
  • LlamaParse