Improved limit for HNSW scan memory

This commit is contained in:
Andrew Kane
2026-02-25 12:52:29 -08:00
parent 411291189d
commit edd49863ba

View File

@@ -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);
so->maxMemory = Min(maxMemory, (double) SIZE_MAX / 2);
scan->opaque = so;