pgvector.git / summary / log / commit / refs
commit ecd413d0fef787782f459c062b4b5f2e7163634f
Author: Andrew Kane <andrew@ankane.org>
Date: Tue Jun 30 08:03:08 2026 +0000
Improved naming [skip ci]
src/hnsw.h | 2 +-
src/hnswvacuum.c | 24 ++++++++++++------------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/hnsw.h b/src/hnsw.h
index 08293be6..e8d1423a 100644
--- a/src/hnsw.h
+++ b/src/hnsw.h
@@ -427,7 +427,7 @@ typedef struct HnswVacuumState
HnswSupport support;
/* Variables */
- struct tidhash_hash *deleted;
+ struct tidhash_hash *deleting;
BufferAccessStrategy bas;
HnswNeighborTuple ntup;
HnswElementData highestPoint;
diff --git a/src/hnswvacuum.c b/src/hnswvacuum.c
index 8296be15..3952c570 100644
--- a/src/hnswvacuum.c
+++ b/src/hnswvacuum.c
@@ -19,12 +19,12 @@
#endif
/*
- * Check if deleted list contains an index TID
+ * Check if deletion list contains an element
*/
static bool
-DeletedContains(tidhash_hash * deleted, ItemPointer indextid)
+DeletingElement(tidhash_hash * deleting, ItemPointer indextid)
{
- return tidhash_lookup(deleted, *indextid) != NULL;
+ return tidhash_lookup(deleting, *indextid) != NULL;
}
/*
@@ -124,10 +124,10 @@ RemoveHeapTids(HnswVacuumState * vacuumstate)
ItemPointerData ip;
bool found;
- /* Add to deleted list */
+ /* Add to deletion list */
ItemPointerSet(&ip, blkno, offno);
- tidhash_insert(vacuumstate->deleted, ip, &found);
+ tidhash_insert(vacuumstate->deleting, ip, &found);
Assert(!found);
}
else if (etup->level > highestLevel)
@@ -200,8 +200,8 @@ NeedsUpdated(HnswVacuumState * vacuumstate, HnswElement element)
if (!ItemPointerIsValid(indextid))
continue;
- /* Check if in deleted list */
- if (DeletedContains(vacuumstate->deleted, indextid))
+ /* Check if in deletion list */
+ if (DeletingElement(vacuumstate->deleting, indextid))
{
needsUpdated = true;
break;
@@ -335,7 +335,7 @@ RepairGraphEntryPoint(HnswVacuumState * vacuumstate)
ItemPointerSet(&epData, entryPoint->blkno, entryPoint->offno);
- if (DeletedContains(vacuumstate->deleted, &epData))
+ if (DeletingElement(vacuumstate->deleting, &epData))
{
/*
* Replace the entry point with the highest point. If highest
@@ -565,8 +565,8 @@ ConfirmRepaired(HnswVacuumState * vacuumstate)
if (!ItemPointerIsValid(indextid))
continue;
- /* Check if in deleted list */
- if (DeletedContains(vacuumstate->deleted, indextid))
+ /* Check if in deletion list */
+ if (DeletingElement(vacuumstate->deleting, indextid))
elog(ERROR, "hnsw graph not repaired");
}
@@ -748,7 +748,7 @@ InitVacuumState(HnswVacuumState * vacuumstate, IndexVacuumInfo *info, IndexBulkD
HnswGetMetaPageInfo(index, &vacuumstate->m, NULL);
/* Create hash table */
- vacuumstate->deleted = tidhash_create(CurrentMemoryContext, 256, NULL);
+ vacuumstate->deleting = tidhash_create(CurrentMemoryContext, 256, NULL);
}
/*
@@ -757,7 +757,7 @@ InitVacuumState(HnswVacuumState * vacuumstate, IndexVacuumInfo *info, IndexBulkD
static void
FreeVacuumState(HnswVacuumState * vacuumstate)
{
- tidhash_destroy(vacuumstate->deleted);
+ tidhash_destroy(vacuumstate->deleting);
FreeAccessStrategy(vacuumstate->bas);
pfree(vacuumstate->ntup);
MemoryContextDelete(vacuumstate->tmpCtx);
[parent: 497db7976cbd]