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:
Andrew Kane
2024-10-10 20:57:57 -07:00
parent 9a2bc87b0c
commit c7bbf5e030
+6 -1
View File
@@ -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);