pgvector.git / summary / log / commit / refs

commit    9ba3db7efe9d4a83b58afd76bfeb2f0d5a986c6c
Author:   Andrew Kane <andrew@ankane.org>
Date:     Wed Jul 29 17:55:20 2026 +0000

    Updated max level to be more realistic [skip ci]


src/hnsw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hnsw.h b/src/hnsw.h index 3b241234..1f25cc29 100644 --- a/src/hnsw.h +++ b/src/hnsw.h @@ -130,7 +130,7 @@ typedef Pointer Item; #define HnswGetMl(m) (1 / log(m)) /* Ensure fits on page and in uint8 */ -#define HnswGetMaxLevel(m) Min(((BLCKSZ - MAXALIGN(SizeOfPageHeaderData) - MAXALIGN(sizeof(HnswPageOpaqueData)) - offsetof(HnswNeighborTupleData, indextids) - sizeof(ItemIdData)) / (sizeof(ItemPointerData)) / (m)) - 2, 255) +#define HnswGetMaxLevel(m) Min(((BLCKSZ - MAXALIGN(SizeOfPageHeaderData) - MAXALIGN(sizeof(HnswPageOpaqueData)) - offsetof(HnswNeighborTupleData, indextids) - sizeof(ItemIdData)) / (sizeof(ItemPointerData)) / (m)) - 2, 63) #define HnswGetSearchCandidate(membername, ptr) pairingheap_container(HnswSearchCandidate, membername, ptr) #define HnswGetSearchCandidateConst(membername, ptr) pairingheap_const_container(HnswSearchCandidate, membername, ptr) [parent: ecd003dc5e62]