mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-13 16:16:56 +08:00
Disabled compression for index tuples with IVFFlat
This commit is contained in:
@@ -287,7 +287,7 @@ InsertTuples(Relation index, IvfflatBuildState * buildstate, ForkNumber forkNum)
|
|||||||
#else
|
#else
|
||||||
TupleTableSlot *slot = MakeSingleTupleTableSlot(buildstate->tupdesc);
|
TupleTableSlot *slot = MakeSingleTupleTableSlot(buildstate->tupdesc);
|
||||||
#endif
|
#endif
|
||||||
TupleDesc tupdesc = RelationGetDescr(index);
|
TupleDesc tupdesc = IvfflatTupleDesc(index);
|
||||||
|
|
||||||
UpdateProgress(PROGRESS_CREATEIDX_SUBPHASE, PROGRESS_IVFFLAT_PHASE_LOAD);
|
UpdateProgress(PROGRESS_CREATEIDX_SUBPHASE, PROGRESS_IVFFLAT_PHASE_LOAD);
|
||||||
|
|
||||||
|
|||||||
@@ -287,6 +287,7 @@ void IvfflatInitPage(Buffer buf, Page page);
|
|||||||
void IvfflatInitRegisterPage(Relation index, Buffer *buf, Page *page, GenericXLogState **state);
|
void IvfflatInitRegisterPage(Relation index, Buffer *buf, Page *page, GenericXLogState **state);
|
||||||
void IvfflatInit(void);
|
void IvfflatInit(void);
|
||||||
PGDLLEXPORT void IvfflatParallelBuildMain(dsm_segment *seg, shm_toc *toc);
|
PGDLLEXPORT void IvfflatParallelBuildMain(dsm_segment *seg, shm_toc *toc);
|
||||||
|
TupleDesc IvfflatTupleDesc(Relation index);
|
||||||
|
|
||||||
/* Index access methods */
|
/* Index access methods */
|
||||||
IndexBuildResult *ivfflatbuild(Relation heap, Relation index, IndexInfo *indexInfo);
|
IndexBuildResult *ivfflatbuild(Relation heap, Relation index, IndexInfo *indexInfo);
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ InsertTuple(Relation index, Datum *values, bool *isnull, ItemPointer heap_tid, R
|
|||||||
originalInsertPage = insertPage;
|
originalInsertPage = insertPage;
|
||||||
|
|
||||||
/* Form tuple */
|
/* Form tuple */
|
||||||
itup = index_form_tuple(RelationGetDescr(index), &value, isnull);
|
itup = index_form_tuple(IvfflatTupleDesc(index), &value, isnull);
|
||||||
itup->t_tid = *heap_tid;
|
itup->t_tid = *heap_tid;
|
||||||
|
|
||||||
/* Get tuple size */
|
/* Get tuple size */
|
||||||
|
|||||||
@@ -238,3 +238,17 @@ IvfflatUpdateList(Relation index, ListInfo listInfo,
|
|||||||
UnlockReleaseBuffer(buf);
|
UnlockReleaseBuffer(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the tuple descriptor
|
||||||
|
*/
|
||||||
|
TupleDesc
|
||||||
|
IvfflatTupleDesc(Relation index)
|
||||||
|
{
|
||||||
|
TupleDesc tupdesc = RelationGetDescr(index);
|
||||||
|
|
||||||
|
/* Prevent compression */
|
||||||
|
TupleDescAttr(tupdesc, 0)->attstorage = TYPSTORAGE_PLAIN;
|
||||||
|
|
||||||
|
return tupdesc;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user