pgvector.git / summary / log / commit / refs
commit 643eacd9dcb0ff21858a7bf05b96eb947451f5bd
Author: Andrew Kane <andrew@ankane.org>
Date: Wed Sep 13 02:37:42 2023 +0000
Improved variable name [skip ci]
src/ivfbuild.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/ivfbuild.c b/src/ivfbuild.c
index d2b0fec1..15ba9aac 100644
--- a/src/ivfbuild.c
+++ b/src/ivfbuild.c
@@ -506,11 +506,11 @@ CreateListPages(Relation index, VectorArray centers, int dimensions,
Buffer buf;
Page page;
GenericXLogState *state;
- Size itemsz;
+ Size listSize;
IvfflatList list;
- itemsz = MAXALIGN(IVFFLAT_LIST_SIZE(dimensions));
- list = palloc(itemsz);
+ listSize = MAXALIGN(IVFFLAT_LIST_SIZE(dimensions));
+ list = palloc(listSize);
buf = IvfflatNewBuffer(index, forkNum);
IvfflatInitRegisterPage(index, &buf, &page, &state);
@@ -525,11 +525,11 @@ CreateListPages(Relation index, VectorArray centers, int dimensions,
memcpy(&list->center, VectorArrayGet(centers, i), VECTOR_SIZE(dimensions));
/* Ensure free space */
- if (PageGetFreeSpace(page) < itemsz)
+ if (PageGetFreeSpace(page) < listSize)
IvfflatAppendPage(index, &buf, &page, &state, forkNum);
/* Add the item */
- offno = PageAddItem(page, (Item) list, itemsz, InvalidOffsetNumber, false, false);
+ offno = PageAddItem(page, (Item) list, listSize, InvalidOffsetNumber, false, false);
if (offno == InvalidOffsetNumber)
elog(ERROR, "failed to add index item to \"%s\"", RelationGetRelationName(index));
[parent: bca50a03fade]