diff --git a/src/ivfbuild.c b/src/ivfbuild.c index a78dd39..b6a95e5 100644 --- a/src/ivfbuild.c +++ b/src/ivfbuild.c @@ -482,7 +482,7 @@ CreateListPages(Relation index, VectorArray centers, int dimensions, Size listSize; IvfflatList list; - listSize = MAXALIGN(IVFFLAT_LIST_SIZE(VECTOR_SIZE(dimensions))); + listSize = MAXALIGN(IVFFLAT_LIST_SIZE(centers->itemsize)); list = palloc0(listSize); buf = IvfflatNewBuffer(index, forkNum);