The pg_vexec project introduces a vectorized execution engine for PostgreSQL 19, implemented as a set of extensions. It includes a vector planner and executor, an Arrow Flight SQL endpoint for ADBC clients, and kernel packages for pgvector and PostGIS. The system allows for columnar data processing in memory without modifying the PostgreSQL core.
The architecture integrates with the ORCA planner to evaluate the cost of vector nodes alongside standard row-based operations. It maintains PostgreSQL semantics, including collation and data types, while processing data in batches of 1024 rows. This approach enables efficient filtering, projection, and aggregation within CPU cache limits.
Development began on October 2, 2024, with coding starting on October 5. By October 7, the project reached thirteen iterations, including the implementation of Arrow IPC data transfer between servers via the existing Motion mechanism. The solution supports both the standard pgwire protocol and modern Flight SQL.
The project avoids the limitations of external engines like Apache DataFusion by operating directly within the PostgreSQL backend. It utilizes existing hooks to register custom scan, join, and aggregation paths. The system passes 239 regression tests and verifies correctness against TPC-H and TPC-DS benchmarks.






