pgvector.git / summary / log / commit / refs
commit 284f2f0fecfb53208126e15bea49e7efe061e10b
Author: Andrew Kane <andrew@ankane.org>
Date: Wed Feb 25 20:59:17 2026 +0000
Improved casting for HNSW scan memory limit [skip ci]
src/hnswscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hnswscan.c b/src/hnswscan.c
index 8752d626..ad8163cf 100644
--- a/src/hnswscan.c
+++ b/src/hnswscan.c
@@ -151,7 +151,7 @@ hnswbeginscan(Relation index, int nkeys, int norderbys)
/* Calculate max memory */
/* Add 256 extra bytes to fill last block when close */
maxMemory = (double) work_mem * hnsw_scan_mem_multiplier * 1024.0 + 256;
- so->maxMemory = Min(maxMemory, (double) SIZE_MAX / 2);
+ so->maxMemory = Min(maxMemory, (double) (SIZE_MAX / 2));
scan->opaque = so;
[parent: edd49863badb]