Technology

pgvector

The de facto open-source PostgreSQL extension for vector similarity search. Adds a `vector` data type plus indexed nearest-neighbor operators (L2, cosine, inner product) directly inside PostgreSQL, so vector workloads share transactions, joins, and ACID guarantees with the rest of the relational schema. Supports both **HNSW** (in-memory, low-latency) and **IVFFlat** (memory-conservative, larger scale) indexes. v0.8.x stabilized the operator surface and added significant index-build improvements; community usage spans most production RAG stacks built on PostgreSQL.

6 connections 1 post

Definition

What it is

The de facto open-source PostgreSQL extension for vector similarity search. Adds a `vector` data type plus indexed nearest-neighbor operators (L2, cosine, inner product) directly inside PostgreSQL, so vector workloads share transactions, joins, and ACID guarantees with the rest of the relational schema. Supports both **HNSW** (in-memory, low-latency) and **IVFFlat** (memory-conservative, larger scale) indexes. v0.8.x stabilized the operator surface and added significant index-build improvements; community usage spans most production RAG stacks built on PostgreSQL.

Why it exists

Most RAG pipelines start with PostgreSQL already in the stack for application data. Adding a separate vector database (Pinecone, Qdrant, Milvus) creates a sync problem and an operational footprint engineers don't want unless they have to. pgvector lets a vector index live where the document text and metadata already live, eliminating the cross-system embedding-drift problem until scale forces the migration to specialized stores.

Primary use cases

Embedding storage for RAG pipelines on PostgreSQL-native applications, hybrid keyword + vector queries via SQL `JOIN`, vector search co-located with row-level access controls, prototype-to-production vector workloads where the operational floor matters more than peak throughput.

Recent developments

Latest signals

Source mix note: pgvector's recent corpus is dominated by vendor-comparison surveys; the bullets below cite the concrete claims that are corroborated across multiple sources.

  • pgvectorscale hits 471 QPS at 99% recall on 50M vectors — 11.4× Qdrant baseline. Per Firecrawl's "Best Vector Databases 2026" guide, Timescale's pgvectorscale extension (the disk-based companion to pgvector) achieves 471 QPS at 99% recall on a 50M-vector benchmark — roughly 11.4× faster than Qdrant on the same workload. AWS self-host pricing for pgvectorscale runs ~75% less than Pinecone equivalent. The honest caveat: the pgvector + pgvectorscale combination hits operational walls beyond ~100M vectors and starts losing ground to specialized vector stores.
  • Cost positioning: cheapest below 50M vectors; needs sharding above. Per GroovyWeb's vector DB comparison 2026, pgvector is the cheapest option below 50M vectors; below 10M, pgvector and Chroma win on raw latency. At 50M+ vectors, Weaviate and Pinecone start pulling ahead unless pgvector deployments add sharding. Decision framing: pgvector is the right answer for prototype-through-mid-scale RAG; the specialized vector stores are the right answer when scale forces the migration.

Connections 6

Outbound 6

Featured in