LinkedIn has introduced pg_vectorsearch, an open-source extension for PostgreSQL designed to provide a high-performance alternative to the common HNSW (Hierarchical Navigable Small World) and IVFFlat indexes used in the `pgvector` extension. The core of this new tool is the PRISM index, which shifts the underlying architecture from graph-based traversal to a hierarchy of centroids and partitions. By organizing the vector space into a tree of clusters, the index allows for more predictable memory usage and faster construction times compared to the complex graph structures required by HNSW.

LinkedIn's pg_vectorsearch logo and branding
LinkedIn's new open-source pg_vectorsearch extension for PostgreSQL.www.linkedin.com

This image represents the official branding for the pg_vectorsearch extension and its PRISM index architecture.

The PRISM index operates by partitioning the vector space using hierarchical k-means clustering. During a query, the system performs a level-by-level beam search to identify relevant partitions, then scans their associated posting lists. To minimize the amount of data moved into memory, the extension employs RaBitQ (Random Bit Quantization), which represents vectors using approximately one bit per dimension. This quantization includes mathematical error bounds, allowing the system to establish a threshold for candidates. If a candidate's lower bound exceeds the current best result, it can be discarded without fetching the full-precision vector from the PostgreSQL heap, significantly reducing random I/O.

While PRISM offers significant performance gains—reportedly achieving 6 ms query latency on 100 million vectors with 4x less memory than HNSW—it introduces specific technical constraints. The index currently supports a maximum of 1,968 dimensions, which may exclude high-dimensional use cases. Additionally, the extension requires PostgreSQL version 18 or higher, potentially creating a migration barrier for legacy production environments. To maintain accuracy near partition boundaries, PRISM can store duplicate copies of vectors in adjacent partitions, a strategy that ensures neighbors are not missed due to the inherent limitations of centroid-based routing.

Because PRISM is implemented as a native PostgreSQL index access method, it integrates directly with the database's standard buffer management, Write-Ahead Logging (WAL), and Multi-Version Concurrency Control (MVCC). This integration ensures that frequently accessed parts of the centroid tree remain in the shared buffer cache, while the use of 'FASTSCAN' pages allows for SIMD-vectorized scoring of 32 vectors simultaneously. However, as the index grows through new insertions, the physical adjacency of posting list pages may degrade over time, potentially impacting the efficiency of sequential scans compared to the initial index build.