vectorscale
pgvectorscale : Advanced indexing for vector data with DiskANN
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 1820 | vectorscale | pgvectorscale | 0.9.1 |
RAG | PostgreSQL | Rust |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| Requires | vector |
| See Also | vector vchord pgcontext vectorize pg_rrf pg_search vchord_bm25 pg_bestmatch pgml pg4ml |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.9.1 |
18 17 16 15 14 | pgvectorscale |
vector |
| RPM | PIGSTY | 0.9.1 |
18 17 16 15 14 | pgvectorscale_$v |
pgvector_$v |
| DEB | PIGSTY | 0.9.1 |
18 17 16 15 14 | postgresql-$v-pgvectorscale |
postgresql-$v-pgvector |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| el8.aarch64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| el9.x86_64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| el9.aarch64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| el10.x86_64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| el10.aarch64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| d12.x86_64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| d12.aarch64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| d13.x86_64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| d13.aarch64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| u22.x86_64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| u22.aarch64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| u24.x86_64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| u24.aarch64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| u26.x86_64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
| u26.aarch64 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 | PIGSTY 0.9.1 |
Source
github.com/timescale/pgvectorscale
pgvectorscale-0.9.1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
vectorscale adds the StreamingDiskANN approximate vector index to pgvector. Its diskann access method supports L2, inner product, cosine distance, and label filtering. It requires vector; creating the extension requires superuser privileges. Version 0.9.1 validates vector types, dimensions, and stored datum layouts to address crashes, memory disclosure, and out-of-bounds writes.
Core Workflow
Declare a concrete vector dimension and select the operator class matching the query distance:
Use vector_l2_ops with <->, vector_ip_ops with <#>, or vector_cosine_ops with <=>. Labels use smallint[], and && means any requested label overlaps. Ordinary WHERE conditions are also supported, but selective filters can reduce the returned result count and need workload-specific testing.
Tuning and Ordering
diskann.query_search_list_size controls extra graph-search candidates (default 100); diskann.query_rescore controls exact rescoring (default 50, 0 disables it):
Build options include storage_layout, num_neighbors, search_list_size, and num_dimensions. Compressed memory-optimized storage is the default. Increase maintenance memory only after considering concurrent builds and dataset size. Parallel builds require the supported compression layout and do not support label columns in this version.
DiskANN returns relaxed distance ordering. Sort a materialized result set when strict ordering is required; this reorders the retrieved candidates without making approximate search exhaustive. Null vectors are not indexed, null labels act as empty arrays, and null array elements are ignored. Index creation on UNLOGGED tables is unsupported.
Upgrade to 0.9.1
Install matching extension files and update each database:
The upgrade binds operator classes to pgvector’s actual installation schema and checks existing bindings. If an existing operator class references the wrong type or operators, the upgrade aborts; follow the release instructions to drop the affected operator class and recreate extension objects, accounting for dependent indexes.
DiskANN now requires a valid vector(N) column type. An unconstrained vector column cannot be indexed. Existing indexes with invalid persisted dimensions raise errors during scans, inserts, and vacuum. Correct the column type, then drop and recreate the affected indexes: REINDEX cannot repair this condition. Valid existing indexes do not need a blanket rebuild merely because 0.9.1 was installed. The SQL surface is not relocatable after extension creation.