Fixed highest point in HNSW vacuum [skip ci]

This commit is contained in:
Andrew Kane
2023-08-18 22:23:19 -07:00
parent ca726052ae
commit ca847d02b0

View File

@@ -278,8 +278,11 @@ RepairGraphEntryPoint(HnswVacuumState * vacuumstate)
* ideal. * ideal.
*/ */
if (!BlockNumberIsValid(highestPoint->blkno))
highestPoint = NULL;
/* Repair graph for highest non-entry point */ /* Repair graph for highest non-entry point */
if (BlockNumberIsValid(highestPoint->blkno)) if (highestPoint != NULL)
{ {
HnswLoadElement(highestPoint, NULL, NULL, index, vacuumstate->procinfo, vacuumstate->collation, true); HnswLoadElement(highestPoint, NULL, NULL, index, vacuumstate->procinfo, vacuumstate->collation, true);
RepairGraphElement(vacuumstate, highestPoint); RepairGraphElement(vacuumstate, highestPoint);