mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-10 14:46:56 +08:00
Improved casting for HNSW scan memory limit [skip ci]
This commit is contained in:
@@ -151,7 +151,7 @@ hnswbeginscan(Relation index, int nkeys, int norderbys)
|
|||||||
/* Calculate max memory */
|
/* Calculate max memory */
|
||||||
/* Add 256 extra bytes to fill last block when close */
|
/* Add 256 extra bytes to fill last block when close */
|
||||||
maxMemory = (double) work_mem * hnsw_scan_mem_multiplier * 1024.0 + 256;
|
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;
|
scan->opaque = so;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user