pgvector.git / summary / log / commit / refs
commit 2a8b9d689e5ebd5d4bab07e50d8666c31ca2a042
Author: Andrew Kane <andrew@ankane.org>
Date: Tue Jun 11 22:45:03 2024 +0000
Moved check
src/ivfinsert.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/ivfinsert.c b/src/ivfinsert.c
index 1da4822b..b748c5ee 100644
--- a/src/ivfinsert.c
+++ b/src/ivfinsert.c
@@ -19,9 +19,6 @@ FindInsertPage(Relation index, Datum *values, BlockNumber *insertPage, ListInfo
FmgrInfo *procinfo;
Oid collation;
- /* Ensure index is valid */
- IvfflatGetMetaPageInfo(index, NULL, NULL);
-
/* Avoid compiler warning */
listInfo->blkno = nextblkno;
listInfo->offno = FirstOffsetNumber;
@@ -97,6 +94,9 @@ InsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heap_tid, R
value = IvfflatNormValue(typeInfo, collation, value);
}
+ /* Ensure index is valid */
+ IvfflatGetMetaPageInfo(index, NULL, NULL);
+
/* Find the insert page - sets the page and list info */
FindInsertPage(index, values, &insertPage, &listInfo);
Assert(BlockNumberIsValid(insertPage));
[parent: 18cd8a60c3a2]