mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-15 00:56:54 +08:00
Reduced memory usage during index build - #7
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 0.1.5 (unreleased)
|
||||||
|
|
||||||
|
- Reduced memory usage during index build
|
||||||
|
|
||||||
## 0.1.4 (2021-05-09)
|
## 0.1.4 (2021-05-09)
|
||||||
|
|
||||||
- Fixed kmeans for inner product
|
- Fixed kmeans for inner product
|
||||||
|
|||||||
@@ -194,7 +194,10 @@ GetNextTuple(Tuplesortstate *sortstate, TupleDesc tupdesc, TupleTableSlot *slot,
|
|||||||
ItemPointerSet(&(*itup)->t_tid, tupblk, tupoff);
|
ItemPointerSet(&(*itup)->t_tid, tupblk, tupoff);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
*list = -1;
|
*list = -1;
|
||||||
|
*itup = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -243,6 +246,8 @@ InsertTuples(Relation index, IvfflatBuildState * buildstate, ForkNumber forkNum)
|
|||||||
|
|
||||||
buildstate->indtuples += 1;
|
buildstate->indtuples += 1;
|
||||||
|
|
||||||
|
pfree(itup);
|
||||||
|
|
||||||
GetNextTuple(buildstate->sortstate, tupdesc, slot, &itup, &list);
|
GetNextTuple(buildstate->sortstate, tupdesc, slot, &itup, &list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,6 +258,9 @@ InsertTuples(Relation index, IvfflatBuildState * buildstate, ForkNumber forkNum)
|
|||||||
/* Set the start and insert pages */
|
/* Set the start and insert pages */
|
||||||
IvfflatUpdateList(index, state, buildstate->listInfo[i], insertPage, startPage, forkNum);
|
IvfflatUpdateList(index, state, buildstate->listInfo[i], insertPage, startPage, forkNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (itup != NULL)
|
||||||
|
pfree(itup);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user