-- pg_turbovec v1.20.0 -- IVF scaling: parallel build/scan + sublinear coarse. -- -- This file is a *reference mirror*. The authoritative install -- script is generated by `cargo pgrx schema`. -- -- v1.20.0 lands the IVF scaling work surfaced by the benchmark A/B/C -- benchmark. All changes are scan-path / build-path / in-memory -- -- NO wire-format change (MetaPageData::version stays 5), no SQL -- surface change beyond one new GUC, and NO REINDEX. -- -- * Sublinear two-level coarse quantizer: for an IVF index with -- lists > 4096, cell selection is now O(sqrt lists) instead of -- O(lists). The two-level structure is computed IN-MEMORY at -- index-open from the already-persisted coarse centroids (a -- deterministic function of them), so nothing new is persisted -- and EXISTING v4/v5 IVF indexes get it for free on the next -- scan -- NO REINDEX. Measured 39-364x fewer centroid distance -- computations per query at recall 1.0, which lets `lists` grow -- large (tiny cells) without the coarse step becoming the -- bottleneck -- the key enabler for IVF at 10M+. -- -- * turbovec.scan_parallelism (NEW GUC, int, default 0 = auto = -- min(cores, 4); 1 = serial): parallelizes the per-query IVF -- fine-scan across probed cells (out-of-core path), cutting -- single-query latency at high dimension. Conservative default -- to protect aggregate QPS under concurrency. Results are -- identical to the serial scan (same top-k). -- -- * Parallel IVF build: the k-means training and assign-sweep now -- use the bounded build pool (turbovec.build_parallelism) across -- cores, memory-bounded and BYTE-IDENTICAL (the reduction order -- is a fixed function of the input, independent of thread count). -- Modest speedup at high dim (the single-threaded GEMM remains -- the dominant term); a deterministic parallel GEMM is scoped -- follow-up work. -- -- No DDL beyond the new GUC (cargo pgrx schema emits it). No on-disk -- migration. `ALTER EXTENSION pg_turbovec UPDATE TO '1.20.0';` is -- sufficient. Existing indexes are unaffected and benefit from the -- sublinear coarse + parallel scan with no rebuild.