Added check for ef_construction [skip ci]

This commit is contained in:
Andrew Kane
2023-08-10 21:09:38 -07:00
parent 3ff2e34d7f
commit 451e36cee7
3 changed files with 6 additions and 0 deletions

View File

@@ -423,6 +423,9 @@ InitBuildState(HnswBuildState * buildstate, Relation heap, Relation index, Index
if (buildstate->dimensions > HNSW_MAX_DIM)
elog(ERROR, "column cannot have more than %d dimensions for hnsw index", HNSW_MAX_DIM);
if (buildstate->efConstruction < 2 * buildstate->m)
elog(ERROR, "ef_construction must be greater than or equal to 2 * m");
buildstate->reltuples = 0;
buildstate->indtuples = 0;