Skip to content
aicoolies logo
pgvector PostgreSQL parent mark

pgvector

Vector similarity search for PostgreSQL

pgvector is an open-source PostgreSQL extension with 22K+ GitHub stars adding vector similarity search to your existing Postgres database. Store embeddings alongside relational data, perform exact and approximate nearest neighbor search using L2, inner product, cosine, and L1 metrics. Supports HNSW and IVFFlat indexes for fast similarity queries at scale. Eliminates the need for a separate vector database by bringing vector capabilities into existing PostgreSQL infrastructure.

About pgvector

pgvector adds vector similarity search to PostgreSQL. With 22K+ stars, it is the default choice for teams wanting vector search without adding a separate database.

Store embeddings as a native column type alongside relational data. Combine SQL filters with vector similarity search in a single query.

HNSW indexes for high-recall approximate search, IVFFlat for faster builds. L2, inner product, cosine, and L1 distance metrics.

Works with Supabase, Neon, AWS RDS, Google Cloud SQL, and self-hosted. Integrates with LangChain, LlamaIndex, and all AI frameworks supporting PostgreSQL.

Pricing & Platform Specs

Pricing Summary

pgvector is a 100% open-source PostgreSQL extension licensed under the PostgreSQL License. It is completely free to self-host with no licensing fees or query quotas.

Supported Platforms

PostgreSQL extension

Explore categories, tags & use cases

BM25 full-text search extension for PostgreSQL

pg_textsearch is a PostgreSQL extension from Timescale that adds BM25 relevance-ranked full-text search directly inside Postgres. Using the same ranking algorithm as Elasticsearch and Lucene, it provides search-engine quality results without requiring a separate search cluster — particularly valuable for developers building RAG pipelines on PostgreSQL who want semantic-quality ranking alongside pgvector.

Open Source

Managed Postgres platform with 200+ extensions as pre-built stacks

Tembo is a managed PostgreSQL platform that packages 200+ Postgres extensions into purpose-built stacks for specific workloads. Stacks include OLAP analytics, vector search, message queues, geospatial, and machine learning, turning PostgreSQL into a specialized database for each use case. Eliminates the need for separate Redis, Elasticsearch, or Kafka instances alongside Postgres.

freemiumOpen Source

Embedding-first search and discovery engine for AI-powered product experiences.

Marqo is an open-source tensor search engine that combines embedding generation and vector search in a single API, removing the need to manage separate embedding pipelines and vector databases. Built for product discovery and multi-modal search, it lets teams index text, images, and structured data together, returning ranked results based on semantic similarity rather than keyword overlap.

freemiumOpen Source

Side-by-Side Comparisons

Milvus logo
Milvus
vs
pgvector PostgreSQL parent mark
pgvector

Milvus vs pgvector: Which Vector Database Wins in 2026?

For most teams building RAG apps or MVPs, pgvector is the stronger default: it adds vector search to the Postgres you already run, keeping embeddings beside relational data with no extra cluster to operate. Milvus is a purpose-built distributed vector database that pulls ahead at massive scale, hundreds of millions of vectors, very high QPS, and GPU-accelerated indexes. This comparison shows where each fits.

Milvuspgvector
Weaviate logo
Weaviate
vs
pgvector PostgreSQL parent mark
pgvector

Weaviate vs pgvector: AI-Native Hybrid Search or Postgres Simplicity?

Weaviate and pgvector can both support production RAG, yet their product boundaries are fundamentally different. Weaviate is an AI-native vector database with object and vector storage, BM25 and vector hybrid search, model-provider integrations, reranking, multi-tenancy, replication, and access-control features. pgvector is a PostgreSQL extension that adds vector similarity to the relational database many applications already use. For teams explicitly comparing the two to build a search or RAG platform, Weaviate stands out as the primary recommendation. Its integrated hybrid retrieval, tenant-aware data model, modular vectorization, and production search controls reduce the amount of application glue required for a sophisticated retrieval service. pgvector remains the better minimalist option when vectors should stay beside existing relational data, but Weaviate wins the dominant search-platform intent.

Weaviatepgvector
Qdrant logo
Qdrant
vs
pgvector PostgreSQL parent mark
pgvector

Qdrant vs pgvector: Dedicated Vector Engine or Postgres-Native Search?

Qdrant and pgvector solve vector retrieval from opposite directions. Qdrant is a dedicated vector database with payload-aware filtering, dense and sparse retrieval, hybrid query composition, quantization, and a service API. pgvector extends PostgreSQL so embeddings live beside relational data and participate in SQL, transactions, joins, backups, access controls, and the rest of an existing Postgres operating model. For the broadest buyer group—application teams that already trust PostgreSQL—pgvector stands out as the primary recommendation. It avoids a second data system, keeps transactional data and embeddings together, and turns vector search into an incremental database capability. Qdrant is the stronger specialist for greenfield retrieval services, complex payload filtering, or workloads that need a purpose-built vector engine, but most teams should exhaust the simpler Postgres-native path before adding another distributed service.

Qdrantpgvector
Chroma logo
Chroma
vs
pgvector PostgreSQL parent mark
pgvector

Chroma vs pgvector: AI Retrieval Database or Postgres-Native Vectors?

Chroma and pgvector solve the vector-search problem from opposite directions. Chroma is the better fit when AI retrieval should live in a specialized collection API with documents, embeddings, metadata, filters, and hosted vector or hybrid search options. pgvector is the better fit when vectors should live beside application data in Postgres with SQL, JOINs, ACID semantics, backups, point-in-time recovery, and familiar database operations. For the primary buyer intent, Chroma is our pick because it offers a focused retrieval layer; pgvector remains the better fit when PostgreSQL operations are the governing constraint.

Chromapgvector
View 3 more comparisons

Community experience

Sources & verification

Sources checked
Content verified

Verification dates are editorial checks. Routine CMS saves and automatic updatedAt timestamps do not advance them.

FAQ

What is pgvector?

pgvector is an open-source PostgreSQL extension with 22K+ GitHub stars adding vector similarity search to your existing Postgres database. Store embeddings alongside relational data, perform exact and approximate nearest neighbor search using L2, inner product, cosine, and L1 metrics. Supports HNSW and IVFFlat indexes for fast similarity queries at scale. Eliminates the need for a separate vector database by bringing vector capabilities into existing PostgreSQL infrastructure.

Is pgvector free?

Yes — pgvector is open source and free to use. pgvector is a 100% open-source PostgreSQL extension licensed under the PostgreSQL License. It is completely free to self-host with no licensing fees or query quotas.

Is pgvector open source?

Yes — pgvector is open source.

Is pgvector still maintained?

Yes — pgvector is active. Its listing was last verified on August 26, 2026.

What are the best pgvector alternatives?

The first editor-selected pgvector alternatives are pg_textsearch, Tembo, Marqo.

How does pgvector score in our review?

The published editorial review lists pgvector at 86/100 overall across speed, privacy, and developer experience. Check the review's evidence status and test metadata for its verification level.