mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-04 08:18:46 +00:00
The original motivation was to eliminate the superfluous HnswPtrAccess call from AddToVisited. The caller has to call HnswPtrAccess() anyway, so it makes sense to pass the HnswElement rather than HnswElementPtr to AddToVisited(). But then I realized that we can use the pointer-variant even with shared memory, because the visited-hash is backend-private, and the addresses where the elements are mapped to in shared memory are stable within the backend.