From ca847d02b04b5677c1a95e538dc30d1d92a6366a Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Fri, 18 Aug 2023 22:23:19 -0700 Subject: [PATCH] Fixed highest point in HNSW vacuum [skip ci] --- src/hnswvacuum.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hnswvacuum.c b/src/hnswvacuum.c index 9a16103..146c5c3 100644 --- a/src/hnswvacuum.c +++ b/src/hnswvacuum.c @@ -278,8 +278,11 @@ RepairGraphEntryPoint(HnswVacuumState * vacuumstate) * ideal. */ + if (!BlockNumberIsValid(highestPoint->blkno)) + highestPoint = NULL; + /* Repair graph for highest non-entry point */ - if (BlockNumberIsValid(highestPoint->blkno)) + if (highestPoint != NULL) { HnswLoadElement(highestPoint, NULL, NULL, index, vacuumstate->procinfo, vacuumstate->collation, true); RepairGraphElement(vacuumstate, highestPoint);