Reduced memory usage during index build - #7

This commit is contained in:
Andrew Kane
2021-05-24 18:40:34 -07:00
parent 2cf71ec6bd
commit db83f4faa8
2 changed files with 12 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
## 0.1.5 (unreleased)
- Reduced memory usage during index build
## 0.1.4 (2021-05-09)
- Fixed kmeans for inner product

View File

@@ -194,7 +194,10 @@ GetNextTuple(Tuplesortstate *sortstate, TupleDesc tupdesc, TupleTableSlot *slot,
ItemPointerSet(&(*itup)->t_tid, tupblk, tupoff);
}
else
{
*list = -1;
*itup = NULL;
}
}
/*
@@ -243,6 +246,8 @@ InsertTuples(Relation index, IvfflatBuildState * buildstate, ForkNumber forkNum)
buildstate->indtuples += 1;
pfree(itup);
GetNextTuple(buildstate->sortstate, tupdesc, slot, &itup, &list);
}
@@ -253,6 +258,9 @@ InsertTuples(Relation index, IvfflatBuildState * buildstate, ForkNumber forkNum)
/* Set the start and insert pages */
IvfflatUpdateList(index, state, buildstate->listInfo[i], insertPage, startPage, forkNum);
}
if (itup != NULL)
pfree(itup);
}
/*