Overview
pgvectorscale is a PostgreSQL extension that complements pgvector, the open-source vector data extension for Postgres. It adds a StreamingDiskANN index type, inspired by Microsoft's DiskANN algorithm, along with Statistical Binary Quantization for compact storage and label-based filtered vector search.
It is meant for application developers and DBAs who already store embeddings in PostgreSQL with pgvector and want approximate nearest neighbor search to stay fast and affordable as data grows into the tens of millions of vectors. You keep your data in Postgres instead of moving it to a separate vector database.
Unlike pgvector, which is written in C, pgvectorscale is built in Rust using the PGRX framework. It installs as the `vectorscale` extension and works alongside pgvector, so you create indexes and run queries with familiar SQL and pgvector distance operators. In October 2026 Tiger Data said pgvectorscale would enter maintenance mode, with most new vector-search work moving to its partition-based pg_vectorsearch extension.
What it does
- StreamingDiskANN index, a disk-friendly graph index inspired by Microsoft's DiskANN research
- Statistical Binary Quantization for compact storage and faster search than standard binary quantization
- Label-based filtered vector search that combines similarity search with label filtering
- Works as a complement to pgvector, reusing its VECTOR type and distance operators (<=>, <->, <#>)
- Self-hosted on your own PostgreSQL, available via Docker, source build, or Timescale Cloud
- Written in Rust with PGRX, giving the Postgres community another way to contribute to vector support
Getting started
Install the extension, enable it in your database, then create a StreamingDiskANN index on an embedding column and query it with pgvector operators.
Run PostgreSQL with the extension
The quickest path is the TimescaleDB Docker image, which bundles pgvectorscale. Then connect with psql.
psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"Create the extension
Enable vectorscale. CASCADE automatically installs pgvector as well.
CREATE EXTENSION IF NOT EXISTS vectorscale CASCADE;Create a table with an embedding column
Store your embeddings in a VECTOR column using the pgvector type.
CREATE TABLE IF NOT EXISTS document_embedding (
id BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
metadata JSONB,
contents TEXT,
embedding VECTOR(1536)
);Add a StreamingDiskANN index and query it
Create a diskann index, then run a nearest neighbor search with the cosine distance operator.
CREATE INDEX document_embedding_idx ON document_embedding
USING diskann (embedding vector_cosine_ops);
SELECT *
FROM document_embedding
ORDER BY embedding <=> $1
LIMIT 10;Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Scaling an existing pgvector setup to tens of millions of embeddings while keeping low query latency
- Keeping vector search inside PostgreSQL instead of running a separate vector database
- Combining vector similarity with label filtering for more precise retrieval in a RAG pipeline
- Reducing storage cost for large embedding tables using binary quantization
How pgvectorscale compares
pgvectorscale alongside other open-source vector databases tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Supabase | ★ 112k | Managed Postgres backend whose Vector toolkit (pgvector) stores, indexes, and queries embeddings next to transactional data. |
| Redis Cloud | ★ 76.8k | Fully-managed Redis with built-in vector search, offering low-latency similarity and hybrid queries over any embeddings. |
| Milvus | ★ 46.4k | A distributed vector database for storing and searching billions of embeddings at scale, with multiple index types and Kubernetes-native deployment. |
| FAISS | ★ 41.2k | A library from Meta for efficient similarity search and clustering of dense vectors, with both exact and approximate indexes. |
| Qdrant | ★ 35.1k | A Rust-based vector search engine that stores embeddings with rich payload filtering for semantic search and recommendation systems. |
| Chroma | ★ 29.5k | A developer-focused vector database designed for quickly building retrieval and RAG features with a simple Python and JavaScript API. |
| pgvector | ★ 23.4k | A PostgreSQL extension that adds a vector data type and similarity search so you can store and query embeddings inside an existing Postgres database. |
| pgvectorscale | ★ 3.1k | A DiskANN-based index that scales pgvector search on PostgreSQL |
