DEV.co
Vector Databases · tensorchord

pgvecto.rs

pgvecto.rs is a PostgreSQL extension written in Rust that adds vector similarity search capabilities to Postgres. It supports high-dimensional vectors (up to 65,535 dimensions), multiple vector data types, and filtering during search—addressing key limitations of pgvector.

Source: GitHub — github.com/tensorchord/pgvecto.rs
2.2k
GitHub stars
84
Forks
Rust
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorytensorchord/pgvecto.rs
Ownertensorchord
Primary languageRust
LicenseApache-2.0 — OSI-approved
Stars2.2k
Forks84
Open issues76
Latest releasev0.4.0 (2024-11-21)
Last updated2025-02-26
Sourcehttps://github.com/tensorchord/pgvecto.rs

What pgvecto.rs is

A pgrx-based PostgreSQL extension providing vector similarity search via three distance operators (<->, <#>, <=>), supporting standard vectors, FP16, binary vectors, and INT8 types. Implements SIMD acceleration with runtime CPU dispatch and separate index/data storage. Note: project recommends migration to VectorChord for new deployments.

Quickstart

Get the pgvecto.rs source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/tensorchord/pgvecto.rs.gitcd pgvecto.rs# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

High-Dimensional Vector Search with Filters

Applications requiring semantic search on vectors >2000 dimensions combined with metadata filtering (e.g., field-specific RAG, multi-tenant embeddings). pgvecto.rs handles filtered TopK queries without incomplete result sets.

Memory-Constrained Deployments

Systems needing to reduce vector storage footprint via FP16 or INT8 quantization while maintaining indexed search. Separate index storage avoids PostgreSQL native storage overhead.

Hybrid Vector + Relational Queries

Complex queries combining vector similarity search with SQL JOINs and relational filters on the same table (e.g., product recommendations with inventory checks, time-windowed embeddings).

Implementation considerations

  • Requires PostgreSQL extension installation (Docker image provided for quick start); assess PG version compatibility and managed database constraints (RDS, Cloud SQL may not support custom extensions).
  • WAL support for indexes still in progress—evaluate transaction safety requirements and whether data-only WAL suffices for your workload.
  • Dimension limits up to 65,535 but index performance and memory usage at extreme dimensions unknown; benchmark with representative data shapes.
  • FP16/INT8 types reduce storage but introduce quantization tradeoffs; measure recall/precision loss for your embedding models before full deployment.
  • Project actively points users to VectorChord as successor; plan migration timeline if stability/performance updates are important to your roadmap.

When to avoid it — and what to weigh

  • Stability/Production-Critical Systems — Project README explicitly recommends migration to VectorChord for better stability and performance. pgvecto.rs is marked as legacy; consider VectorChord for new production deployments.
  • Index WAL Full Support Required — pgvecto.rs has incomplete WAL support for indexes (data WAL is supported, index WAL is in progress). If crash-safe indexing is critical, pgvector or VectorChord may be safer.
  • Low-Latency, Sub-ms Response Requirements — While SIMD-accelerated, no published latency benchmarks provided. Projects with strict <5ms tail latencies should benchmark against dedicated vector databases.
  • Multi-Database Strategy — Tight coupling to PostgreSQL means no portability. If cross-database flexibility is needed, consider standalone vector DBs (Pinecone, Weaviate, Milvus).

License & commercial use

Apache License 2.0 (Apache-2.0)—permissive OSI-approved license permitting commercial use, modification, and distribution with attribution and patent protection.

Apache-2.0 permits commercial use, redistribution, and closed-source deployment without royalties or license fees. No commercial support entity or SLA mentioned in data; assess your support model independently. Project recommends VectorChord for new production use, which may affect commercial support availability.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

As a PostgreSQL extension, inherits PostgreSQL authentication/authorization. No security audit, CVE history, or threat model published in data. Extension runs in same process as PostgreSQL; memory-safety properties depend on Rust compilation and pgrx framework maturity. Evaluate extension source code and pgrx dependencies for your threat model.

Alternatives to consider

pgvector

Official PostgreSQL vector extension; simpler, battle-tested, native WAL support for indexes, no Rust dependency. Supports up to 2000 dimensions; lacks filtering-aware search and quantized types. Lower adoption risk for conservative deployments.

VectorChord

Successor project by same team (TensorChord); explicitly recommended for new deployments. Promises better stability and performance than pgvecto.rs. Worth evaluating if adopting this ecosystem.

Dedicated Vector Databases (Pinecone, Weaviate, Milvus)

Decoupled from relational DB; optimized indexing, managed scaling, cloud-native. Trade-off: operational complexity, separate sync with primary data, higher cost. Better for >100M vectors or extreme latency requirements.

Software development agency

Build on pgvecto.rs with DEV.co software developers

pgvecto.rs offers high-dimensional vectors and filtering—but evaluate VectorChord first for new projects. Our engineers can help you assess architecture, migration risk, and PostgreSQL deployment complexity.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

pgvecto.rs FAQ

Should I use pgvecto.rs or VectorChord for a new project?
README recommends VectorChord for new deployments due to better stability and performance. pgvecto.rs is considered legacy. Evaluate VectorChord first unless you have strong reasons to use pgvecto.rs specifically.
What PostgreSQL versions are supported?
Docker image shows pg17-v0.4.0; specific version support matrix not in provided data. Check installation docs or GitHub releases for version compatibility.
How does filtering differ from pgvector?
pgvecto.rs supports filtered TopK queries without incomplete results (guarantees N results even with filters). pgvector returns fewer results if filters exclude rows from the TopK candidate set.
Is index WAL crash-safety guaranteed?
No. Data WAL is supported; index WAL support is in progress. If index durability is critical, verify against your RTO/RPO requirements or consider pgvector.

Work with a software development agency

DEV.co helps companies turn open-source tools like pgvecto.rs into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your vector databases stack.

Ready to Add Vector Search to PostgreSQL?

pgvecto.rs offers high-dimensional vectors and filtering—but evaluate VectorChord first for new projects. Our engineers can help you assess architecture, migration risk, and PostgreSQL deployment complexity.