diff --git a/src/ivfbuild.c b/src/ivfbuild.c index fce1348..c0fda3f 100644 --- a/src/ivfbuild.c +++ b/src/ivfbuild.c @@ -338,7 +338,7 @@ InsertTuples(Relation index, IvfflatBuildState * buildstate, ForkNumber forkNum) IvfflatCommitBuffer(buf, state); /* Set the start and insert pages */ - IvfflatUpdateList(index, state, buildstate->listInfo[i], insertPage, InvalidBlockNumber, startPage, forkNum); + IvfflatUpdateList(index, buildstate->listInfo[i], insertPage, InvalidBlockNumber, startPage, forkNum); } } diff --git a/src/ivfflat.h b/src/ivfflat.h index 0e0e6f4..ab2776f 100644 --- a/src/ivfflat.h +++ b/src/ivfflat.h @@ -279,7 +279,7 @@ void IvfflatKmeans(Relation index, VectorArray samples, VectorArray centers); FmgrInfo *IvfflatOptionalProcInfo(Relation rel, uint16 procnum); bool IvfflatNormValue(FmgrInfo *procinfo, Oid collation, Datum *value, Vector * result); int IvfflatGetLists(Relation index); -void IvfflatUpdateList(Relation index, GenericXLogState *state, ListInfo listInfo, BlockNumber insertPage, BlockNumber originalInsertPage, BlockNumber startPage, ForkNumber forkNum); +void IvfflatUpdateList(Relation index, ListInfo listInfo, BlockNumber insertPage, BlockNumber originalInsertPage, BlockNumber startPage, ForkNumber forkNum); void IvfflatCommitBuffer(Buffer buf, GenericXLogState *state); void IvfflatAppendPage(Relation index, Buffer *buf, Page *page, GenericXLogState **state, ForkNumber forkNum); Buffer IvfflatNewBuffer(Relation index, ForkNumber forkNum); diff --git a/src/ivfinsert.c b/src/ivfinsert.c index 3975e76..8e64f64 100644 --- a/src/ivfinsert.c +++ b/src/ivfinsert.c @@ -172,7 +172,7 @@ InsertTuple(Relation rel, Datum *values, bool *isnull, ItemPointer heap_tid, Rel /* Update the insert page */ if (insertPage != originalInsertPage) - IvfflatUpdateList(rel, state, listInfo, insertPage, originalInsertPage, InvalidBlockNumber, MAIN_FORKNUM); + IvfflatUpdateList(rel, listInfo, insertPage, originalInsertPage, InvalidBlockNumber, MAIN_FORKNUM); } /* diff --git a/src/ivfutils.c b/src/ivfutils.c index 1232f16..a37f51f 100644 --- a/src/ivfutils.c +++ b/src/ivfutils.c @@ -176,12 +176,13 @@ IvfflatAppendPage(Relation index, Buffer *buf, Page *page, GenericXLogState **st * Update the start or insert page of a list */ void -IvfflatUpdateList(Relation index, GenericXLogState *state, ListInfo listInfo, +IvfflatUpdateList(Relation index, ListInfo listInfo, BlockNumber insertPage, BlockNumber originalInsertPage, BlockNumber startPage, ForkNumber forkNum) { Buffer buf; Page page; + GenericXLogState *state; IvfflatList list; bool changed = false; diff --git a/src/ivfvacuum.c b/src/ivfvacuum.c index c618b2b..fc3ee7f 100644 --- a/src/ivfvacuum.c +++ b/src/ivfvacuum.c @@ -51,13 +51,13 @@ ivfflatbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, { BlockNumber searchPage = startPages[coffno - FirstOffsetNumber]; BlockNumber insertPage = InvalidBlockNumber; - GenericXLogState *state; /* Iterate over entry pages */ while (BlockNumberIsValid(searchPage)) { Buffer buf; Page page; + GenericXLogState *state; OffsetNumber offno; OffsetNumber maxoffno; OffsetNumber deletable[MaxOffsetNumber]; @@ -125,7 +125,7 @@ ivfflatbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, if (BlockNumberIsValid(insertPage)) { listInfo.offno = coffno; - IvfflatUpdateList(index, state, listInfo, insertPage, InvalidBlockNumber, InvalidBlockNumber, MAIN_FORKNUM); + IvfflatUpdateList(index, listInfo, insertPage, InvalidBlockNumber, InvalidBlockNumber, MAIN_FORKNUM); } } }