mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-14 16:46:54 +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->first = true;
|
||||||
so->v.tids = NULL;
|
so->v.tids = NULL;
|
||||||
so->discarded = 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,
|
so->tmpCtx = AllocSetContextCreate(CurrentMemoryContext,
|
||||||
"Hnsw scan temporary context",
|
"Hnsw scan temporary context",
|
||||||
ALLOCSET_DEFAULT_SIZES);
|
0, 8 * 1024, 512 * 1024);
|
||||||
|
|
||||||
/* Set support functions */
|
/* Set support functions */
|
||||||
HnswInitSupport(&so->support, index);
|
HnswInitSupport(&so->support, index);
|
||||||
|
|||||||
Reference in New Issue
Block a user