Added hnsw.search_mem_multiplier option

This commit is contained in:
Andrew Kane
2024-10-24 18:02:20 -07:00
parent 67eff41c44
commit ac6576e53a
4 changed files with 15 additions and 6 deletions

View File

@@ -28,6 +28,7 @@ static const struct config_enum_entry hnsw_iterative_search_options[] = {
int hnsw_ef_search;
int hnsw_iterative_search;
int hnsw_max_search_tuples;
double hnsw_search_mem_multiplier;
int hnsw_lock_tranche_id;
static relopt_kind hnsw_relopt_kind;
@@ -87,6 +88,11 @@ HnswInit(void)
NULL, &hnsw_max_search_tuples,
20000, 1, INT_MAX, PGC_USERSET, 0, NULL, NULL, NULL);
/* Same range and default as hash_mem_multiplier */
DefineCustomRealVariable("hnsw.search_mem_multiplier", "Sets the multiple of work_mem to use for iterative search",
NULL, &hnsw_search_mem_multiplier,
2, 1, 1000, PGC_USERSET, 0, NULL, NULL, NULL);
MarkGUCPrefixReserved("hnsw");
}