pgpu
pgpu · GPU acceleration for PostgreSQL vector index builds using NVIDIA CUDA/cuVS and VectorChord.
Overview
PostgreSQL · 14, 15, 16, 17, 18
Usage
Sources:
- Upstream README
- Extension control file
- Cargo package metadata
- VectorChord index creation implementation
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:
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.