Version availability
Vector Plus is available for WarehousePG 7 on EL 8 and EL 9 (amd64).
The EDB Vector Plus (edb_vectorplus) extension adds the ivfplus index access method for vector similarity search. Vector Plus uses hierarchical Inverted File (IVF) clustering and RaBitQ quantization to deliver faster queries with a lower memory footprint at large row counts.
On WarehousePG (WHPG), Vector Plus builds on the pgvector extension, and each segment builds and scans its own ivfplus index over its own slice of the table.
Vector Plus requires pgvector 0.7.0 or later. The WarehousePG pgvector extension meets this requirement. Install pgvector before you enable Vector Plus.
Installing Vector Plus
Refer to Downloading and installing an extension for installation and setup instructions. The package name is edb-whpg7-vectorplus.
Note
Vector Plus is published in the analytics repository. When you follow the installation instructions, set EDB_REPO=analytics instead of EDB_REPO=gpsupp.
Enabling the extension
Enable the extension in each database where you want to use it. CASCADE creates pgvector's vector type first, which edb_vectorplus requires:
CREATE EXTENSION edb_vectorplus CASCADE;
For more information, see Configuring Vector Plus.
Using Vector Plus
For guidance on creating ivfplus indexes, tuning queries, filtering, and measuring recall, see Using Vector Plus. For the full list of operator classes, index options, parameters, and functions, see the Vector Plus reference.
Considerations for WarehousePG
Account for the following differences when you run Vector Plus on a WarehousePG cluster. Each segment holds its own index, so Vector Plus behaves differently than on a single Postgres node.
- Set
optimizer = offbefore running queries. The ORCA optimizer has no path for a custom index access method, so it plans a sequential scan and never usesivfplus. - The
ivfplus.probesandivfplus.max_probesconfiguration parameters apply per segment. A query over an N-segment cluster visits up toprobes× N lists in total, which increases both recall and work compared to the same setting on a single node. - The
listsindex option also applies per segment. Each segment clusters roughlyrows / Nrows intolistslists, so divide the usualrows / 1000sizing rule by N. - The
ivfplus_metapage_info()andcheck_ivfplus_index_health()functions describe the coordinator's copy of the index, which holds no rows. They report an empty, healthy index regardless of the state of the segments. To see the real state, see Checking index health across segments. - Index builds are serial.
Checking index health across segments
To check the real state of an ivfplus index, query each primary segment directly and sum the counters.
From the coordinator, list the primary segments using the
gp_segment_configurationcatalog:SELECT hostname, port FROM gp_segment_configuration WHERE role = 'p' AND content >= 0 ORDER BY content;
For each segment, connect in utility mode and run the health check. Replace
<index_name>with the name of your index:PGOPTIONS='-c gp_role=utility' psql -h <hostname> -p <port> -d <database_name> \ -c "SELECT * FROM check_ivfplus_index_health('<index_name>');"
Sum the
n_frozen_live,n_dead_lanes, andn_pendingcounters across all segments.