vchord
vchord : Vector database plugin for Postgres, written in Rust
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLd-r | No | Yes | Yes | Yes | yes | no |
| Relationships | |
|---|---|
| Requires | vector |
| See Also | vector vectorscale pgcontext vectorize pg_rrf pg_search vchord_bm25 pg_bestmatch pgml pg4ml |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.1.1 |
18 17 16 15 14 | vchord |
vector |
| RPM | PIGSTY | 1.1.1 |
18 17 16 15 14 | vchord_$v |
pgvector_$v |
| DEB | PIGSTY | 1.1.1 |
18 17 16 15 14 | postgresql-$v-vchord |
postgresql-$v-pgvector |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el8.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el9.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el9.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el10.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| el10.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| d12.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| d12.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| d13.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| d13.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u22.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u22.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u24.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u24.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u26.x86_64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
| u26.aarch64 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 | PIGSTY 1.1.1 |
Source
github.com/supervc-stack/VectorChord
VectorChord-1.1.1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
Usage
Sources:
- 1.1.1 README
- Control and dependency
- Preload requirement
- 1.1.1 SQL objects
- Query settings
- 1.1.1 migration
- 1.1.1 release notes
vchord adds approximate vector indexes to PostgreSQL using pgvector’s types. It provides the partition-based vchordrq and graph-based vchordg access methods. The extension requires vector, shared preloading, and superuser privileges to create.
Create and Query an Index
Add the library to the existing preload list, preserving other entries, and restart PostgreSQL:
Use vector_l2_ops with <->, vector_ip_ops with <#>, and vector_cosine_ops with <=>. The inner-product operator returns a negative value for ascending index ordering. The same operator classes can be used with the graph access method; choose one index design for the workload:
Range Queries and Tuning
The extension supplies explicit sphere predicates for range search:
<<->>, <<#>>, and <<=>> are sphere predicates for L2, inner product, and cosine metrics. Probe counts depend on the partition layout; tune them with representative data. The epsilon setting controls the reranking tradeoff. The graph search setting controls its candidate search breadth. Both index methods are approximate: check recall, filters, and query plans before choosing settings.
Quantization in 1.1.1
rabitq8 and rabitq4 store quantized vectors. quantize_to_rabitq8 and quantize_to_rabitq4 accept vector or halfvec. Version 1.1.1 adds dequantize_to_vector and dequantize_to_halfvec overloads for both quantized types:
Quantization loses precision; dequantization returns an approximation. The release also replaces the quantization implementation. Install matching library and SQL files, restart for the preloaded library, then update each database:
The 1.1.0-to-1.1.1 script adds these four conversion overloads and declares no index-format migration. Earlier-version upgrade requirements depend on the starting version. Index construction and prewarming consume resources; schedule them for the dataset size. vchordg_prewarm is the corresponding graph-index helper. The control is relocatable, so qualify extension objects or include their installation schema in the search path when installed outside the usual schema.