-- pg_turbovec v1.10.0 -- IVF coarse-quantizer layer. -- -- This file is a *reference mirror*. The authoritative install -- script is generated by `cargo pgrx schema`. -- -- v1.10.0 adds an inverted-file (IVF) ANN structure over the -- quantized codes. It is the first wire-format -- change since v1.4.0: MetaPageData::version 3 -> 4. -- -- ** Existing v3 indexes do NOT need a REINDEX. ** A v1.10.0 binary -- reads a v3 index as a flat (lists=0) index, byte-compatible. Only -- users who WANT IVF rebuild with the new reloption: -- -- CREATE INDEX ... USING turbovec (emb vec_cosine_ops) -- WITH (bit_width = 4, lists = 1024 [, assign_dups = 2]); -- -- New SQL surface (all additive; emitted by cargo pgrx schema): -- reloption lists int default 0 (0 = flat; N = IVF cells, ~sqrt(n)) -- reloption assign_dups int default 1 (1 = single; M = soft multi-assign) -- GUC turbovec.probes int default 8 (cells scanned per query) -- GUC turbovec.max_probes int default 64 (iterative-scan probe-widening cap) -- -- IVF turns the flat O(n*dim) scan into a coarse search over `lists` -- centroids + a fine search restricted to the `probes` nearest cells, -- so query work drops to roughly (probes/lists) of the corpus. probes -- is the recall/latency dial; probes >= lists reduces to the exact -- flat scan. -- -- There is no DDL or on-disk migration for existing indexes. The -- upgrade path `ALTER EXTENSION pg_turbovec UPDATE TO '1.10.0';` -- resolves against this file plus the cargo-pgrx-generated reloption/ -- GUC registration. No REINDEX required unless you opt into IVF.