Skip to content

vexec_pgvector

pgvector distance kernel declarations for the vexec batch executor

pg_vexec · pgvector distance kernel declarations for the vexec batch executor

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102172vexec_pgvectorpg_vexec1.1RAGApache-2.0C

PostgreSQL · 19

Relationships
Requiresvexec vector

Usage

Sources:

vexec_pgvector is a PostgreSQL 19 companion to the vexec vectorized executor. It registers declarations for the underlying extension’s functions so batch execution can reuse their behavior.

Core Workflow

shared_preload_libraries = 'vexec,vexec_pgvector'
vexec.mode = auto
SELECT * FROM vexec_pgvector.declarations();
SELECT * FROM vexec.declared_calls();

Operational Boundaries

Preload both vexec and vexec_pgvector on every participating server and restart; preload order is unrestricted. vexec.mode must enable vector execution. CREATE EXTENSION vexec_pgvector is optional inspection support and requires the underlying vector extension; it does not activate hooks. vexec.declared_calls() shows the bound calls. A superuser creates the non-relocatable SQL objects.

The pack binds only pgvector 0.8.6 and 0.8.7. Other versions run without pack acceleration. It calls pgvector functions through fmgr and checks matching dimensions; erroring rows fall back to PostgreSQL evaluation. It is not a new vector index method.

Version1.1 adds vexec_pgvector.batch_topk for exact L2 nearest neighbors over a candidate relation, accepting vector or halfvec arrays. It returns query subscripts, integer candidate IDs and distances, with ties ordered by ID and NULL candidates/IDs skipped. The scan uses caller privileges and row visibility; it does not add an ANN index. Existing installations have a1.0-to1.1 upgrade script.

Table reader