Enterprise DNA
O Open Source Observability medium

pgvector

by Community

Open-source vector similarity search for Postgres

P

OSS

pgvector

Added 1 June 2026

#approximate-nearest-neighbor-search #nearest-neighbor-search

Overview

pgvector is an open-source PostgreSQL extension that adds vector data types and similarity search operators to Postgres. It enables approximate nearest neighbor search directly within your database using L2, cosine, and inner product distance metrics. Built in C for performance, it integrates with existing Postgres workflows without requiring a separate vector database.

Best for

Best for
Teams already using Postgres who want vector search without adding infrastructure

Use cases

  • Semantic search over embeddings stored in Postgres
  • Recommendation systems using vector similarity
  • RAG pipelines that query embeddings alongside relational data

Notes

pgvector is an open-source PostgreSQL extension that adds vector data types and similarity search operators to Postgres. It enables approximate nearest neighbor search directly within your database using L2, cosine, and inner product distance metrics. Built in C for performance, it integrates with existing Postgres workflows without requiring a separate vector database.

21,551 stars on GitHub. Last updated 2026-05-30.

Use cases

  • Semantic search over embeddings stored in Postgres
  • Recommendation systems using vector similarity
  • RAG pipelines that query embeddings alongside relational data

Pros

  • Runs inside Postgres, eliminating separate vector DB infrastructure
  • Supports multiple distance metrics and indexing strategies (HNSW, IVFFlat)
  • Active community with 21k+ stars and regular maintenance

Cons

  • Performance scales differently than dedicated vector databases at very large scales
  • Requires Postgres expertise to optimize indexes and queries
  • Limited to Postgres ecosystem, not portable to other databases

Indexed from awesome-llmops and enriched against its public facts.

Pros

  • Runs inside Postgres, eliminating separate vector DB infrastructure
  • Supports multiple distance metrics and indexing strategies (HNSW, IVFFlat)
  • Active community with 21k+ stars and regular maintenance

Cons

  • Performance scales differently than dedicated vector databases at very large scales
  • Requires Postgres expertise to optimize indexes and queries
  • Limited to Postgres ecosystem, not portable to other databases

Pairs with

Other entries in the index that connect to this one. Click through to see the chain.

Alternatives7entries