mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-06 05:51:21 +08:00
Use a lower max allocation size than default to allow scanning more tuples for iterative search before exceeding work_mem [skip ci]
This commit is contained in:
@@ -118,9 +118,14 @@ hnswbeginscan(Relation index, int nkeys, int norderbys)
|
||||
so->first = true;
|
||||
so->v.tids = NULL;
|
||||
so->discarded = NULL;
|
||||
|
||||
/*
|
||||
* Use a lower max allocation size than default to allow scanning more
|
||||
* tuples for iterative search before exceeding work_mem
|
||||
*/
|
||||
so->tmpCtx = AllocSetContextCreate(CurrentMemoryContext,
|
||||
"Hnsw scan temporary context",
|
||||
ALLOCSET_DEFAULT_SIZES);
|
||||
0, 8 * 1024, 512 * 1024);
|
||||
|
||||
/* Set support functions */
|
||||
HnswInitSupport(&so->support, index);
|
||||
|
||||
Reference in New Issue
Block a user