# pgvector

> Open-source vector similarity search inside Postgres

**Category:** Databases  
**Pricing:** open-source  
**URL:** https://github.com/pgvector/pgvector  
**GitHub:** https://github.com/pgvector/pgvector  
**Added:** 2026-10-18

---

## The Hook

pgvector is a Postgres extension that stores embeddings in a vector column next to the rest of your data, so semantic search, RAG retrieval and recommendations are a SQL query with an ORDER BY distance instead of a separate vector database.

## What's Good

PostgreSQL License (pgvector/pgvector, a permissive BSD-style license; GitHub shows it as NOASSERTION), latest tag v0.8.7, supports Postgres 13+. Exact and approximate nearest-neighbour search with HNSW and IVFFlat indexes; single-precision, half-precision, binary and sparse vectors; L2, inner product, cosine, L1, Hamming and Jaccard distance. You keep ACID, JOINs, point-in-time recovery and backups from Postgres. It ships in Docker, Homebrew, APT, Yum and Postgres.app, and most managed Postgres providers already offer it. ★~23.4k.

## The Catch

It is an extension, so on self-hosted Postgres you compile or package it yourself, and on managed Postgres you are limited to the version your provider ships. HNSW indexes on large tables are slow to build and need plenty of maintenance_work_mem; at hundreds of millions of vectors you will be tuning, quantizing or partitioning. Filtered queries can return fewer rows than expected with approximate indexes unless you use iterative scans (0.8+).

## Verdict

The default first vector store if you already run Postgres — reach for a dedicated vector database only when you outgrow it.
