10+ Vector & AI Extensions for PostgreSQL

pgvector, pgvecto.rs, pgvectorscale, and other Postgres extensions for vector similarity search and AI / RAG workloads. Ranked by GitHub stars.

Last reviewed: May 15, 2026
10 extensions
1
vector
21.5k+521 30d

vector data type and ivfflat and hnsw access methods

Vector & AI·PostgreSQL·C
2
pgml
6.8k+50 30d

Run AL/ML workloads with SQL interface

Vector & AI·MIT·Rust
3
vectorscale
3.0k+46 30d

Advanced indexing for vector data with DiskANN

Vector & AI·PostgreSQL·Rust
4
vchord
1.7k+39 30d

Vector database plugin for Postgres, written in Rust

Vector & AI·AGPL-3.0·Rust
5
vectorize
830+2 30d

The simplest way to do vector search on Postgres

Vector & AI·PostgreSQL·Rust
6
pg_similarity
400+1 30d

support similarity queries

Vector & AI·BSD-3-Clause·C
7
smlar
128+1 30d

Effective similarity search

Vector & AI·PostgreSQL·C
8

tiktoken tokenizer for use with OpenAI models in postgres

Vector & AI·Apache-2.0·Rust
9

Text Summarization using LLMs. Built using pgrx

Vector & AI·PostgreSQL·Rust
10

Machine learning framework for PostgreSQL

Vector & AI·AGPL-3.0·C

What is a PostgreSQL Vector Extension?

Vector extensions add similarity-search capabilities to Postgres — they let you store high-dimensional embeddings (from OpenAI, Cohere, Sentence-Transformers, etc.) as a new column type and run nearest-neighbor queries with HNSW or IVFFlat indexes. Postgres core doesn't ship these; the ecosystem has converged on pgvector as the de-facto standard, with pgvectorscale, pgvecto.rs, and VectorChord as scale-focused alternatives. Together they power RAG (retrieval-augmented generation), semantic search, recommendation engines, image-to-image retrieval, and anomaly detection — all without adding a separate vector database to your stack.

When to Add a Vector Extension to Postgres

Reach for a vector extension when your application needs similarity search over learned representations: embedding-based product recommendations, RAG over a private knowledge base, semantic search across documents, image retrieval by perceptual similarity, or fraud detection by embedding proximity. If your queries are keyword-based or attribute-filtered, you don't need vectors — pg_trgm for fuzzy text and tsvector for full-text are simpler. If you need 100M+ vectors with sub-100ms latency at high QPS, evaluate a dedicated vector DB (Qdrant, Milvus, Weaviate) before extending Postgres. For most teams under 10M vectors, pgvector with a well-tuned HNSW index wins on operational simplicity — one database, one backup story, one auth model.

Frequently Asked Questions

What is pgvector and why is it the standard?
pgvector is an open-source PostgreSQL extension that adds a vector column type plus HNSW and IVFFlat indexes for nearest-neighbor search. It's MIT-licensed, ~14k GitHub stars, and enabled out-of-the-box on AWS RDS, Aurora, Supabase, Neon, and most managed Postgres providers. Its simplicity (drop-in `CREATE EXTENSION vector;` + a vector(N) column) and broad cloud support made it the default — alternatives like pgvecto.rs and pgvectorscale exist for niche performance needs, but pgvector covers 90% of production cases.
What's the difference between pgvector, pgvecto.rs, and pgvectorscale?
pgvector is the reference C implementation — MIT, broadly supported by managed services, HNSW + IVFFlat indexes. pgvecto.rs is a Rust rewrite (Apache-2.0) focused on streaming index builds and slightly better recall — niche, less cloud support. pgvectorscale is Timescale's DiskANN-backed companion that runs *alongside* pgvector and dramatically improves recall and latency on multi-million-vector datasets (PostgreSQL license). For new projects: start with pgvector. Add pgvectorscale once you're past ~1M vectors and need higher recall.
Does pgvector work on AWS RDS, Supabase, and Neon?
All three support pgvector natively — no special config required, just `CREATE EXTENSION vector;`. AWS RDS supports it on PostgreSQL 15+, Aurora supports it on Aurora PostgreSQL 15.3+, Supabase ships it enabled by default on every project, and Neon includes it in their default extension allow-list. Azure Database for PostgreSQL also supports it. The newer pgvectorscale is *not* available on RDS yet but is on Timescale Cloud and self-managed Postgres.
How do I install pgvector?
On managed services (RDS, Supabase, Neon, Aurora): connect as a user with CREATE privilege and run `CREATE EXTENSION vector;` — the binary is pre-installed. On self-hosted Postgres: install the OS package (e.g. `apt install postgresql-17-pgvector` or `yum install pgvector_17`), then run the CREATE EXTENSION statement as superuser. For environments without PGDG packages, build from source: `git clone https://github.com/pgvector/pgvector && cd pgvector && make && make install`.
When should I use a dedicated vector database instead of pgvector?
Switch to Qdrant, Milvus, or Weaviate when: you have more than ~10M vectors per index and need sub-50ms p99 latency, you need advanced features like multi-vector search or learned indexes, your team can operate a second stateful service, or vector workload dominates the rest of your queries. Stay on pgvector when: your app already runs on Postgres, you want one backup/auth/auditing story, you're under 10M vectors, or hybrid queries (vector + SQL WHERE/JOIN) matter — Postgres does those natively, dedicated DBs need a separate metadata store.

Manage PostgreSQL Visually

1bench is a modern GUI client for PostgreSQL — install extensions, write queries, and inspect schemas without leaving the IDE.

Try 1bench for PostgreSQL