paves
paves · Filtered L2 vector search with CPU and optional GPU execution
Overview
PostgreSQL · 14
| Relationships | |
|---|---|
| Requires | vector |
Usage
Sources:
paves is a PostgreSQL 14 research extension for filtered vector search. It combines scalar predicates with L2 vector ordering and chooses CPU or optional GPU execution paths. Its indexes are static snapshots: table changes require rebuilding the index.
Core Workflow
Install the matching PostgreSQL 14 library and the vector dependency. Add paves to the preload list and restart PostgreSQL, then enable both extensions as an administrator:
The first vector column is indexed. Vector dimensions must agree; null vectors are skipped and an empty build is rejected. Only a single L2 distance ordering using <-> with LIMIT is eligible. Other query forms use normal PostgreSQL paths; inspect the plan to see which path was selected.
Interfaces and Tuning
paves_build(regclass)scans the table, atomically replaces its index file and returns the indexed row count.paves_capacity(regclass)reports dimension, row and scalar-column limits, estimated disk/memory use and GPU availability.paves_feedback()exposes routing feedback and CPU/GPU load counters.paves.enablecontrols custom paths;paves.force_strategyselectsauto,brute,hnsw,gpu_bruteorgpu_hnsw.paves.ef_searchcontrols graph-search breadth;paves.threadscontrols CPU scan workers.paves.build_m,paves.build_ef_constructionandpaves.build_threadsgovern index construction.
CUDA is optional; a CPU build works without it. The GPU worker requires preloading and restart. paves.gpu_enable limits automatic routing, while paves.gpu_batch_max and paves.gpu_batch_wait_us tune worker microbatches. Unsupported sizes or unavailable worker capacity can fall back to CPU execution.
Maintenance and Limits
Re-run paves_build() after writes. Heap visibility rechecks do not maintain the index or guarantee recall of changed data. Index files live under $PGDATA/paves/; DROP TABLE leaves orphan files for manual cleanup. Rebuilds temporarily need both old and new files, and old mappings can remain until sessions end.
The implementation targets PostgreSQL 14 and one resident GPU per index; no broader major-version or multi-GPU support is claimed. Approximate paths trade recall against work. Validate correctness and resource limits for the actual workload; published benchmark results do not establish general performance guarantees. No license declaration was found in the reviewed source revision.