-- pg_turbovec v1.7.0 -- Phase W-2: drop packed_codes mid-finalise. -- -- This file is a *reference mirror*. The authoritative install -- script is generated by `cargo pgrx schema`. -- -- v1.7.0 reorders the `ambuild` finalisation writes so the -- in-memory row-major `packed_codes` Vec and the SIMD-blocked -- derived layout are never alive simultaneously. The single-call -- `relfile::write_full_with_prepared` path is split into two -- phases: -- -- 1. `relfile::write_packed_phase` streams `packed_codes`, -- `scales`, and `slot_to_id` into relfile pages. -- 2. The IdMapIndex materialises the SIMD-blocked layout and -- Lloyd-Max codebook via `prepare_eager()`. -- 3. The new `IdMapIndex::take_packed_codes()` (turbovec 0.7.0) -- swaps the row-major Vec out and shrink_to_fits it for -- drop. The blocked OnceLock survives because it's already -- populated. -- 4. `relfile::write_blocked_phase_and_meta` streams the -- blocked + rotation chains and stamps the meta page LAST -- (matching the standard PG hash/gist AM "meta page is the -- atomic-complete signal" pattern). -- -- Memory profile at 10M x 1536-d x 4-bit: -- pre-W (v1.5.x): 121 GiB peak RSS -- post-W (v1.6.x): 22.5 GiB peak RSS -- post-W-2 (v1.7): ~15 GiB peak RSS <-- this release -- -- The wire format does NOT change -- the v1.7.0 meta page is -- byte-identical to v1.6.x (`MetaPageData::version = 3`). The -- only on-disk-visible change is that the meta page is now -- stamped after every chain page, where previously it was -- written first; readers see no difference because they only -- examine the post-build state. -- -- See docs/UPGRADING.md for the v1.6 -> v1.7 upgrade row (no -- REINDEX needed). Existing v1.6.x indexes continue to work -- unchanged; the v1.7.0 binary's ambuild path simply uses less -- memory during the build. -- -- This migration file exists only so the upgrade path -- `ALTER EXTENSION pg_turbovec UPDATE TO '1.7.0';` resolves -- without an error. It is intentionally empty: there are no -- new SQL objects, no changed signatures, and no removed -- objects in v1.7.0 vs v1.6.x.