diff --git a/src/hnsw.h b/src/hnsw.h
index 1f25cc297..a587fd1f8 100644
--- a/src/hnsw.h
+++ b/src/hnsw.h
@@ -476,7 +476,7 @@ void		HnswAddHeapTid(HnswElement element, ItemPointer heaptid);
 HnswNeighborArray *HnswInitNeighborArray(int lm, HnswAllocator * allocator);
 void		HnswInitNeighbors(char *base, HnswElement element, int m, HnswAllocator * alloc);
 bool		HnswInsertTupleOnDisk(Relation index, HnswSupport * support, Datum value, ItemPointer heaptid, bool building);
-void		HnswUpdateNeighborsOnDisk(Relation index, HnswSupport * support, HnswElement e, int m, bool checkExisting, bool building);
+void		HnswUpdateNeighborsOnDisk(Relation index, HnswSupport * support, HnswElement e, int m, bool building);
 void		HnswLoadElementFromTuple(HnswElement element, HnswElementTuple etup, bool loadHeaptids, bool loadVec);
 void		HnswLoadElement(HnswElement element, double *distance, HnswQuery * q, Relation index, HnswSupport * support, bool loadVec, double *maxDistance);
 bool		HnswFormIndexValue(Datum *out, Datum *values, bool *isnull, const HnswTypeInfo * typeInfo, HnswSupport * support);
diff --git a/src/hnswinsert.c b/src/hnswinsert.c
index 08ff27e42..616de35c6 100644
--- a/src/hnswinsert.c
+++ b/src/hnswinsert.c
@@ -471,7 +471,7 @@ ConnectionExists(HnswElement e, HnswNeighborTuple ntup, int startIdx, int lm)
  * Update neighbor
  */
 static void
-UpdateNeighborOnDisk(HnswElement element, HnswElement newElement, int idx, int m, int lm, int lc, Relation index, bool checkExisting, bool building)
+UpdateNeighborOnDisk(HnswElement element, HnswElement newElement, int idx, int m, int lm, int lc, Relation index, bool building)
 {
 	Buffer		buf;
 	Page		page;
@@ -501,7 +501,7 @@ UpdateNeighborOnDisk(HnswElement element, HnswElement newElement, int idx, int m
 	startIdx = (element->level - lc) * m;
 
 	/* Check for existing connection */
-	if (checkExisting && ConnectionExists(newElement, ntup, startIdx, lm))
+	if (ConnectionExists(newElement, ntup, startIdx, lm))
 		idx = -1;
 	else if (idx == -2)
 	{
@@ -543,7 +543,7 @@ UpdateNeighborOnDisk(HnswElement element, HnswElement newElement, int idx, int m
  * Update neighbors
  */
 void
-HnswUpdateNeighborsOnDisk(Relation index, HnswSupport * support, HnswElement e, int m, bool checkExisting, bool building)
+HnswUpdateNeighborsOnDisk(Relation index, HnswSupport * support, HnswElement e, int m, bool building)
 {
 	char	   *base = NULL;
 
@@ -572,7 +572,7 @@ HnswUpdateNeighborsOnDisk(Relation index, HnswSupport * support, HnswElement e,
 			if (idx == -1)
 				continue;
 
-			UpdateNeighborOnDisk(neighborElement, e, idx, m, lm, lc, index, checkExisting, building);
+			UpdateNeighborOnDisk(neighborElement, e, idx, m, lm, lc, index, building);
 		}
 	}
 
@@ -682,7 +682,7 @@ UpdateGraphOnDisk(Relation index, HnswSupport * support, HnswElement element, in
 		HnswUpdateMetaPage(index, 0, NULL, newInsertPage, MAIN_FORKNUM, building);
 
 	/* Update neighbors */
-	HnswUpdateNeighborsOnDisk(index, support, element, m, false, building);
+	HnswUpdateNeighborsOnDisk(index, support, element, m, building);
 
 	/* Update entry point if needed */
 	if (entryPoint == NULL || element->level > entryPoint->level)
diff --git a/src/hnswvacuum.c b/src/hnswvacuum.c
index 88905db4a..ad44364a0 100644
--- a/src/hnswvacuum.c
+++ b/src/hnswvacuum.c
@@ -270,7 +270,7 @@ RepairGraphElement(HnswVacuumState * vacuumstate, HnswElement element, HnswEleme
 	UnlockReleaseBuffer(buf);
 
 	/* Update neighbors */
-	HnswUpdateNeighborsOnDisk(index, support, element, m, true, false);
+	HnswUpdateNeighborsOnDisk(index, support, element, m, false);
 }
 
 /*
