Skip to content

pgpu

GPU acceleration for PostgreSQL vector index builds using NVIDIA CUDA/cuVS and VectorChord.

pgpu · GPU acceleration for PostgreSQL vector index builds using NVIDIA CUDA/cuVS and VectorChord.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
100727pgpupgpu2.1.0RAGAGPL-3.0Rust

PostgreSQL · 14, 15, 16, 17, 18

Relationships
Requiresvchord vector

Usage

Sources:

pgpu version 2.1.0 uses an NVIDIA GPU to compute vector centroids for a VectorChord index. It reads pgvector data in batches, runs cuVS k-means, writes a centroids table, and optionally drops/rebuilds a VectorChord index with those external centroids.

Smoke test

The build requires the documented CUDA 13.1/cuVS environment plus matching PostgreSQL, vector, and vchord installations. After installation:

CREATE EXTENSION vector;
CREATE EXTENSION vchord;
CREATE EXTENSION pgpu;
SELECT pgpu.ping();
SET pgpu.gpu_acceleration = 'enable';

The main entry point is pgpu.create_vector_index_on_gpu(...); it is a schema-changing, GPU- and memory-intensive operation, so test parameters and recall on a copy first. Version 2.1.0 supports PostgreSQL 14–18 in Cargo features, but the reviewed index builder drops a generated index name and hardcodes the indexed column as embedding during the final VectorChord DDL. Restrict execution to table owners and verify generated names/DDL, GPU resource limits, distance operator, dimensions, and recovery behavior.

Table reader