Improved naming [skip ci]

This commit is contained in:
Andrew Kane
2023-08-01 23:25:42 -07:00
parent fae2b445d6
commit 18b315bb08

View File

@@ -292,7 +292,7 @@ UpdateNeighborPages(Relation index, HnswElement e, int m, List *updates)
GenericXLogState *state; GenericXLogState *state;
HnswUpdate *update = lfirst(lc); HnswUpdate *update = lfirst(lc);
ItemId itemid; ItemId itemid;
Size neighborsz; Size ntupSize;
int idx; int idx;
OffsetNumber offno = update->hc.element->neighborOffno; OffsetNumber offno = update->hc.element->neighborOffno;
@@ -303,7 +303,7 @@ UpdateNeighborPages(Relation index, HnswElement e, int m, List *updates)
page = GenericXLogRegisterBuffer(state, buf, 0); page = GenericXLogRegisterBuffer(state, buf, 0);
itemid = PageGetItemId(page, offno); itemid = PageGetItemId(page, offno);
neighborsz = ItemIdGetLength(itemid); ntupSize = ItemIdGetLength(itemid);
idx = HnswGetIndex(update, m); idx = HnswGetIndex(update, m);
@@ -319,7 +319,7 @@ UpdateNeighborPages(Relation index, HnswElement e, int m, List *updates)
neighbor->distance = update->hc.distance; neighbor->distance = update->hc.distance;
/* Update connections */ /* Update connections */
if (!PageIndexTupleOverwrite(page, offno, (Item) ntup, neighborsz)) if (!PageIndexTupleOverwrite(page, offno, (Item) ntup, ntupSize))
elog(ERROR, "failed to add index item to \"%s\"", RelationGetRelationName(index)); elog(ERROR, "failed to add index item to \"%s\"", RelationGetRelationName(index));
/* Commit */ /* Commit */