mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-06 05:51:21 +08:00
Moved code [skip ci]
This commit is contained in:
@@ -128,6 +128,9 @@ hnswbeginscan(Relation index, int nkeys, int norderbys)
|
||||
so = (HnswScanOpaque) palloc(sizeof(HnswScanOpaqueData));
|
||||
so->typeInfo = HnswGetTypeInfo(index);
|
||||
|
||||
/* Set support functions */
|
||||
HnswInitSupport(&so->support, index);
|
||||
|
||||
/*
|
||||
* Use a lower max allocation size than default to allow scanning more
|
||||
* tuples for iterative search before exceeding work_mem
|
||||
@@ -136,9 +139,6 @@ hnswbeginscan(Relation index, int nkeys, int norderbys)
|
||||
"Hnsw scan temporary context",
|
||||
0, 8 * 1024, 512 * 1024);
|
||||
|
||||
/* Set support functions */
|
||||
HnswInitSupport(&so->support, index);
|
||||
|
||||
/* Calculate max memory */
|
||||
maxMemory = (double) work_mem * hnsw_scan_mem_multiplier * 1024.0;
|
||||
so->maxMemory = Min(maxMemory, (double) SIZE_MAX);
|
||||
|
||||
Reference in New Issue
Block a user