Stack Gems
Menu
← Catalog

pgvector

Open-source vector similarity search inside Postgres

Databases / Data · OSS/MIT · 23.4k

Reviewed 2026-10-18 · last push 2026-10-18 · repo checked 2026-10-19

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.

Embed

Maintainer? Add the badge to your README. It is free, links to this review, and there is no paid version.

Reviewed on Stack Gems

Markdown

[![Reviewed on Stack Gems](https://stackgems.com/badge/pgvector.svg)](https://stackgems.com/gems/pgvector)

HTML

<a href="https://stackgems.com/gems/pgvector"><img src="https://stackgems.com/badge/pgvector.svg" alt="pgvector reviewed on Stack Gems" height="20"></a>