Skip to content
vectorscale

vectorscale

pgvectorscale : Advanced indexing for vector data with DiskANN

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
1820
vectorscale
pgvectorscale
0.9.0
RAG
PostgreSQL
Rust
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d--
No
Yes
No
Yes
no
no
Relationships
Requires
vector
See Also
vchord
vectorize
pg_summarize
pg_tiktoken
pg4ml
pgml
vchord_bm25
pg_similarity

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
0.9.0
18
17
16
15
14
pgvectorscalevector
RPM
PIGSTY
0.9.0
18
17
16
15
14
pgvectorscale_$vpgvector_$v
DEB
PIGSTY
0.9.0
18
17
16
15
14
postgresql-$v-pgvectorscalepostgresql-$v-pgvector
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
el8.aarch64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
el9.x86_64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
el9.aarch64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
el10.x86_64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
el10.aarch64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
d12.x86_64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
d12.aarch64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
d13.x86_64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
d13.aarch64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
u22.x86_64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
u22.aarch64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
u24.x86_64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
u24.aarch64
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
PIGSTY 0.9.0
u26.x86_64
MISS
MISS
MISS
MISS
MISS
u26.aarch64
MISS
MISS
MISS
MISS
MISS
PackageVersionOSORGSIZEFile URL
pgvectorscale_180.9.0el8.x86_64pigsty525.3 KiBpgvectorscale_18-0.9.0-1PIGSTY.el8.x86_64.rpm
pgvectorscale_180.9.0el8.aarch64pigsty391.0 KiBpgvectorscale_18-0.9.0-1PIGSTY.el8.aarch64.rpm
pgvectorscale_180.9.0el9.x86_64pigsty543.2 KiBpgvectorscale_18-0.9.0-1PIGSTY.el9.x86_64.rpm
pgvectorscale_180.9.0el9.aarch64pigsty417.6 KiBpgvectorscale_18-0.9.0-1PIGSTY.el9.aarch64.rpm
pgvectorscale_180.9.0el10.x86_64pigsty543.3 KiBpgvectorscale_18-0.9.0-1PIGSTY.el10.x86_64.rpm
pgvectorscale_180.9.0el10.aarch64pigsty417.2 KiBpgvectorscale_18-0.9.0-1PIGSTY.el10.aarch64.rpm
postgresql-18-pgvectorscale0.9.0d12.x86_64pigsty430.7 KiBpostgresql-18-pgvectorscale_0.9.0-1PIGSTY~bookworm_amd64.deb
postgresql-18-pgvectorscale0.9.0d12.aarch64pigsty300.7 KiBpostgresql-18-pgvectorscale_0.9.0-1PIGSTY~bookworm_arm64.deb
postgresql-18-pgvectorscale0.9.0d13.x86_64pigsty430.9 KiBpostgresql-18-pgvectorscale_0.9.0-1PIGSTY~trixie_amd64.deb
postgresql-18-pgvectorscale0.9.0d13.aarch64pigsty300.7 KiBpostgresql-18-pgvectorscale_0.9.0-1PIGSTY~trixie_arm64.deb
postgresql-18-pgvectorscale0.9.0u22.x86_64pigsty482.1 KiBpostgresql-18-pgvectorscale_0.9.0-1PIGSTY~jammy_amd64.deb
postgresql-18-pgvectorscale0.9.0u22.aarch64pigsty353.8 KiBpostgresql-18-pgvectorscale_0.9.0-1PIGSTY~jammy_arm64.deb
postgresql-18-pgvectorscale0.9.0u24.x86_64pigsty477.6 KiBpostgresql-18-pgvectorscale_0.9.0-1PIGSTY~noble_amd64.deb
postgresql-18-pgvectorscale0.9.0u24.aarch64pigsty349.7 KiBpostgresql-18-pgvectorscale_0.9.0-1PIGSTY~noble_arm64.deb

Source

pig build pkg pgvectorscale;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pgvectorscale;		# install via package name, for the active PG version
pig install vectorscale;		# install by extension name, for the current active PG version

pig install vectorscale -v 18;   # install for PG 18
pig install vectorscale -v 17;   # install for PG 17
pig install vectorscale -v 16;   # install for PG 16
pig install vectorscale -v 15;   # install for PG 15
pig install vectorscale -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION vectorscale CASCADE; -- requires vector

Usage

CREATE EXTENSION vectorscale CASCADE;

CREATE TABLE IF NOT EXISTS document_embedding  (
    id BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
    metadata JSONB,
    contents TEXT,
    embedding VECTOR(1536)
);
  
CREATE INDEX document_embedding_idx ON document_embedding
USING diskann (embedding);

SELECT *
FROM document_embedding
ORDER BY embedding <=> $1
LIMIT 10
Last updated on