diff --git a/CHANGELOG.md b/CHANGELOG.md index ab433f2..00ff83e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 0.8.4 (unreleased) +- Fixed `hnsw graph not repaired` error with HNSW vacuuming - Fixed possible error with inserts during HNSW vacuuming ## 0.8.3 (2026-06-17) diff --git a/src/hnswvacuum.c b/src/hnswvacuum.c index 334e974..8296be1 100644 --- a/src/hnswvacuum.c +++ b/src/hnswvacuum.c @@ -80,6 +80,14 @@ RemoveHeapTids(HnswVacuumState * vacuumstate) if (!HnswIsElementTuple(etup)) continue; + /* + * Skip deleted tuples. It is important they are not added to the + * deleted hash to avoid false positives in NeedsUpdated and + * ConfirmRepaired. + */ + if (etup->deleted) + continue; + if (ItemPointerIsValid(&etup->heaptids[0])) { for (int i = 0; i < HNSW_HEAPTIDS; i++)