Ok so my issue is with immich, which preloads vector.so nixpkgs/nixos/modules/services/web-apps/immich.nix at 2421b36eb4cb5324e63bc9772310a0993adae88e · NixOS/nixpkgs · GitHub
which is a rust crate that depends on another rust crate: pgvecto.rs/Cargo.toml at 2b290b34e8ba69104ea2f800fa53328c6ed6c236 · tensorchord/pgvecto.rs · GitHub
that vendors jemalloc and look it has a “fix” for ios.
Not sure how to untangle that in nix though.
The rust package itself accepts the necessary environment variable: JEMALLOC_SYS_WITH_LG_PAGE
( crates.io: Rust Package Registry)
so I just need to override this vector-rs plugin that is deep in postgres’s build machinery.