pgvector is an open-source extension that adds vector similarity search to Postgres. It lets developers store embeddings in an ordinary table column, then find the nearest neighbors with a SQL query using L2, inner product, cosine, L1, Hamming or Jaccard distance. Both exact and approximate search are supported, with HNSW and IVFFlat indexes for speed, and vectors can be single-precision, half-precision, binary or sparse. The extension is free, and it supports Postgres 13 and newer.
Backend engineers, data scientists and machine learning developers who already run Postgres are the natural audience. Instead of adding a separate vector database, they keep embeddings next to the rest of their data and get ACID compliance, point-in-time recovery and JOINs. Any language with a Postgres client can talk to it, so Python, Ruby, Go, Node and Java teams all qualify. Small teams like the lower operational overhead, and larger ones can use quantization once the number of vectors grows.
Common uses include semantic search over documents, product recommendations, deduplication, and retrieval for LLM applications where relevant passages are fetched before generation. A typical setup creates a table with a vector column, inserts embeddings produced by a model, builds an HNSW index, and queries with ORDER BY embedding distance LIMIT. Filtering and multitenancy patterns let one table serve many customers, and iterative index scans help when a WHERE clause removes many candidates. It installs by compiling from source or through Docker, Homebrew, PGXN, APT, Yum and conda-forge, and many hosted Postgres providers include it.