跳转到主要内容

vectorscale

Advanced indexing for vector data with DiskANN

pgvectorscale : Advanced indexing for vector data with DiskANN

Overview

ID Extension Package Version Category License Language
1820 vectorscale pgvectorscale 0.9.0 RAG PostgreSQL Rust
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-- No Yes No Yes no no

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PIGSTY 0.9.0 18 17 16 15 14 pgvectorscale vector
RPM PIGSTY 0.9.0 18 17 16 15 14 pgvectorscale_$v pgvector_$v
DEB PIGSTY 0.9.0 18 17 16 15 14 postgresql-$v-pgvectorscale postgresql-$v-pgvector
Linux / PG PG18 PG17 PG16 PG15 PG14
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 PIGSTY 0.9.0 PIGSTY 0.9.0 PIGSTY 0.9.0 PIGSTY 0.9.0 PIGSTY 0.9.0
u26.aarch64 PIGSTY 0.9.0 PIGSTY 0.9.0 PIGSTY 0.9.0 PIGSTY 0.9.0 PIGSTY 0.9.0
Package Version OS ORG SIZE File URL
pgvectorscale_18 0.9.0 el8.x86_64 pigsty 1.1 MiB pgvectorscale_18-0.9.0-3PIGSTY.el8.x86_64.rpm
pgvectorscale_18 0.9.0 el8.aarch64 pigsty 977.8 KiB pgvectorscale_18-0.9.0-3PIGSTY.el8.aarch64.rpm
pgvectorscale_18 0.9.0 el9.x86_64 pigsty 1.1 MiB pgvectorscale_18-0.9.0-3PIGSTY.el9.x86_64.rpm
pgvectorscale_18 0.9.0 el9.aarch64 pigsty 1.0 MiB pgvectorscale_18-0.9.0-3PIGSTY.el9.aarch64.rpm
pgvectorscale_18 0.9.0 el10.x86_64 pigsty 1.1 MiB pgvectorscale_18-0.9.0-3PIGSTY.el10.x86_64.rpm
pgvectorscale_18 0.9.0 el10.aarch64 pigsty 1018.5 KiB pgvectorscale_18-0.9.0-3PIGSTY.el10.aarch64.rpm
postgresql-18-pgvectorscale 0.9.0 d12.x86_64 pigsty 888.7 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~bookworm_amd64.deb
postgresql-18-pgvectorscale 0.9.0 d12.aarch64 pigsty 731.8 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~bookworm_arm64.deb
postgresql-18-pgvectorscale 0.9.0 d13.x86_64 pigsty 889.0 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~trixie_amd64.deb
postgresql-18-pgvectorscale 0.9.0 d13.aarch64 pigsty 733.5 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~trixie_arm64.deb
postgresql-18-pgvectorscale 0.9.0 u22.x86_64 pigsty 987.5 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~jammy_amd64.deb
postgresql-18-pgvectorscale 0.9.0 u22.aarch64 pigsty 867.4 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~jammy_arm64.deb
postgresql-18-pgvectorscale 0.9.0 u24.x86_64 pigsty 976.6 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~noble_amd64.deb
postgresql-18-pgvectorscale 0.9.0 u24.aarch64 pigsty 856.8 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~noble_arm64.deb
postgresql-18-pgvectorscale 0.9.0 u26.x86_64 pigsty 973.2 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~resolute_amd64.deb
postgresql-18-pgvectorscale 0.9.0 u26.aarch64 pigsty 855.8 KiB postgresql-18-pgvectorscale_0.9.0-3PIGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgvectorscale_17 0.9.0 el8.x86_64 pigsty 1.1 MiB pgvectorscale_17-0.9.0-3PIGSTY.el8.x86_64.rpm
pgvectorscale_17 0.9.0 el8.aarch64 pigsty 974.7 KiB pgvectorscale_17-0.9.0-3PIGSTY.el8.aarch64.rpm
pgvectorscale_17 0.9.0 el9.x86_64 pigsty 1.1 MiB pgvectorscale_17-0.9.0-3PIGSTY.el9.x86_64.rpm
pgvectorscale_17 0.9.0 el9.aarch64 pigsty 1.0 MiB pgvectorscale_17-0.9.0-3PIGSTY.el9.aarch64.rpm
pgvectorscale_17 0.9.0 el10.x86_64 pigsty 1.1 MiB pgvectorscale_17-0.9.0-3PIGSTY.el10.x86_64.rpm
pgvectorscale_17 0.9.0 el10.aarch64 pigsty 1016.4 KiB pgvectorscale_17-0.9.0-3PIGSTY.el10.aarch64.rpm
postgresql-17-pgvectorscale 0.9.0 d12.x86_64 pigsty 887.0 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~bookworm_amd64.deb
postgresql-17-pgvectorscale 0.9.0 d12.aarch64 pigsty 731.4 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~bookworm_arm64.deb
postgresql-17-pgvectorscale 0.9.0 d13.x86_64 pigsty 886.8 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~trixie_amd64.deb
postgresql-17-pgvectorscale 0.9.0 d13.aarch64 pigsty 731.7 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~trixie_arm64.deb
postgresql-17-pgvectorscale 0.9.0 u22.x86_64 pigsty 984.9 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~jammy_amd64.deb
postgresql-17-pgvectorscale 0.9.0 u22.aarch64 pigsty 865.5 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~jammy_arm64.deb
postgresql-17-pgvectorscale 0.9.0 u24.x86_64 pigsty 973.2 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~noble_amd64.deb
postgresql-17-pgvectorscale 0.9.0 u24.aarch64 pigsty 854.4 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~noble_arm64.deb
postgresql-17-pgvectorscale 0.9.0 u26.x86_64 pigsty 969.8 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~resolute_amd64.deb
postgresql-17-pgvectorscale 0.9.0 u26.aarch64 pigsty 853.1 KiB postgresql-17-pgvectorscale_0.9.0-3PIGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgvectorscale_16 0.9.0 el8.x86_64 pigsty 1.1 MiB pgvectorscale_16-0.9.0-3PIGSTY.el8.x86_64.rpm
pgvectorscale_16 0.9.0 el8.aarch64 pigsty 973.2 KiB pgvectorscale_16-0.9.0-3PIGSTY.el8.aarch64.rpm
pgvectorscale_16 0.9.0 el9.x86_64 pigsty 1.1 MiB pgvectorscale_16-0.9.0-3PIGSTY.el9.x86_64.rpm
pgvectorscale_16 0.9.0 el9.aarch64 pigsty 1.0 MiB pgvectorscale_16-0.9.0-3PIGSTY.el9.aarch64.rpm
pgvectorscale_16 0.9.0 el10.x86_64 pigsty 1.1 MiB pgvectorscale_16-0.9.0-3PIGSTY.el10.x86_64.rpm
pgvectorscale_16 0.9.0 el10.aarch64 pigsty 1016.7 KiB pgvectorscale_16-0.9.0-3PIGSTY.el10.aarch64.rpm
postgresql-16-pgvectorscale 0.9.0 d12.x86_64 pigsty 886.8 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~bookworm_amd64.deb
postgresql-16-pgvectorscale 0.9.0 d12.aarch64 pigsty 731.6 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~bookworm_arm64.deb
postgresql-16-pgvectorscale 0.9.0 d13.x86_64 pigsty 886.5 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~trixie_amd64.deb
postgresql-16-pgvectorscale 0.9.0 d13.aarch64 pigsty 731.9 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~trixie_arm64.deb
postgresql-16-pgvectorscale 0.9.0 u22.x86_64 pigsty 985.1 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~jammy_amd64.deb
postgresql-16-pgvectorscale 0.9.0 u22.aarch64 pigsty 864.9 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~jammy_arm64.deb
postgresql-16-pgvectorscale 0.9.0 u24.x86_64 pigsty 975.1 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~noble_amd64.deb
postgresql-16-pgvectorscale 0.9.0 u24.aarch64 pigsty 854.6 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~noble_arm64.deb
postgresql-16-pgvectorscale 0.9.0 u26.x86_64 pigsty 968.7 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~resolute_amd64.deb
postgresql-16-pgvectorscale 0.9.0 u26.aarch64 pigsty 853.5 KiB postgresql-16-pgvectorscale_0.9.0-3PIGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgvectorscale_15 0.9.0 el8.x86_64 pigsty 1.1 MiB pgvectorscale_15-0.9.0-3PIGSTY.el8.x86_64.rpm
pgvectorscale_15 0.9.0 el8.aarch64 pigsty 963.6 KiB pgvectorscale_15-0.9.0-3PIGSTY.el8.aarch64.rpm
pgvectorscale_15 0.9.0 el9.x86_64 pigsty 1.1 MiB pgvectorscale_15-0.9.0-3PIGSTY.el9.x86_64.rpm
pgvectorscale_15 0.9.0 el9.aarch64 pigsty 1.0 MiB pgvectorscale_15-0.9.0-3PIGSTY.el9.aarch64.rpm
pgvectorscale_15 0.9.0 el10.x86_64 pigsty 1.1 MiB pgvectorscale_15-0.9.0-3PIGSTY.el10.x86_64.rpm
pgvectorscale_15 0.9.0 el10.aarch64 pigsty 1012.6 KiB pgvectorscale_15-0.9.0-3PIGSTY.el10.aarch64.rpm
postgresql-15-pgvectorscale 0.9.0 d12.x86_64 pigsty 879.9 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~bookworm_amd64.deb
postgresql-15-pgvectorscale 0.9.0 d12.aarch64 pigsty 726.2 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~bookworm_arm64.deb
postgresql-15-pgvectorscale 0.9.0 d13.x86_64 pigsty 879.2 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~trixie_amd64.deb
postgresql-15-pgvectorscale 0.9.0 d13.aarch64 pigsty 727.0 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~trixie_arm64.deb
postgresql-15-pgvectorscale 0.9.0 u22.x86_64 pigsty 975.4 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~jammy_amd64.deb
postgresql-15-pgvectorscale 0.9.0 u22.aarch64 pigsty 857.7 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~jammy_arm64.deb
postgresql-15-pgvectorscale 0.9.0 u24.x86_64 pigsty 966.1 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~noble_amd64.deb
postgresql-15-pgvectorscale 0.9.0 u24.aarch64 pigsty 849.4 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~noble_arm64.deb
postgresql-15-pgvectorscale 0.9.0 u26.x86_64 pigsty 962.9 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~resolute_amd64.deb
postgresql-15-pgvectorscale 0.9.0 u26.aarch64 pigsty 846.2 KiB postgresql-15-pgvectorscale_0.9.0-3PIGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgvectorscale_14 0.9.0 el8.x86_64 pigsty 1.1 MiB pgvectorscale_14-0.9.0-3PIGSTY.el8.x86_64.rpm
pgvectorscale_14 0.9.0 el8.aarch64 pigsty 960.4 KiB pgvectorscale_14-0.9.0-3PIGSTY.el8.aarch64.rpm
pgvectorscale_14 0.9.0 el9.x86_64 pigsty 1.1 MiB pgvectorscale_14-0.9.0-3PIGSTY.el9.x86_64.rpm
pgvectorscale_14 0.9.0 el9.aarch64 pigsty 1020.6 KiB pgvectorscale_14-0.9.0-3PIGSTY.el9.aarch64.rpm
pgvectorscale_14 0.9.0 el10.x86_64 pigsty 1.1 MiB pgvectorscale_14-0.9.0-3PIGSTY.el10.x86_64.rpm
pgvectorscale_14 0.9.0 el10.aarch64 pigsty 1009.2 KiB pgvectorscale_14-0.9.0-3PIGSTY.el10.aarch64.rpm
postgresql-14-pgvectorscale 0.9.0 d12.x86_64 pigsty 876.1 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~bookworm_amd64.deb
postgresql-14-pgvectorscale 0.9.0 d12.aarch64 pigsty 723.6 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~bookworm_arm64.deb
postgresql-14-pgvectorscale 0.9.0 d13.x86_64 pigsty 876.8 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~trixie_amd64.deb
postgresql-14-pgvectorscale 0.9.0 d13.aarch64 pigsty 723.4 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~trixie_arm64.deb
postgresql-14-pgvectorscale 0.9.0 u22.x86_64 pigsty 970.8 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~jammy_amd64.deb
postgresql-14-pgvectorscale 0.9.0 u22.aarch64 pigsty 854.3 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~jammy_arm64.deb
postgresql-14-pgvectorscale 0.9.0 u24.x86_64 pigsty 960.7 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~noble_amd64.deb
postgresql-14-pgvectorscale 0.9.0 u24.aarch64 pigsty 845.1 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~noble_arm64.deb
postgresql-14-pgvectorscale 0.9.0 u26.x86_64 pigsty 958.6 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~resolute_amd64.deb
postgresql-14-pgvectorscale 0.9.0 u26.aarch64 pigsty 842.6 KiB postgresql-14-pgvectorscale_0.9.0-3PIGSTY~resolute_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

vectorscale extends pgvector with the StreamingDiskANN index access method for approximate nearest-neighbor search. The example below creates a vector table, builds a diskann index, and runs a distance-ordered query.

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