DRY HNSW procinfo

This commit is contained in:
Andrew Kane
2024-10-09 21:03:18 -07:00
parent 57c05c59a2
commit a98534e5ab
6 changed files with 22 additions and 10 deletions

View File

@@ -573,13 +573,13 @@ InitVacuumState(HnswVacuumState * vacuumstate, IndexVacuumInfo *info, IndexBulkD
vacuumstate->callback_state = callback_state;
vacuumstate->efConstruction = HnswGetEfConstruction(index);
vacuumstate->bas = GetAccessStrategy(BAS_BULKREAD);
vacuumstate->procinfo = index_getprocinfo(index, 1, HNSW_DISTANCE_PROC);
vacuumstate->collation = index->rd_indcollation[0];
vacuumstate->ntup = palloc0(HNSW_TUPLE_ALLOC_SIZE);
vacuumstate->tmpCtx = AllocSetContextCreate(CurrentMemoryContext,
"Hnsw vacuum temporary context",
ALLOCSET_DEFAULT_SIZES);
HnswSetProcinfo(index, &vacuumstate->procinfo, NULL, &vacuumstate->collation);
/* Get m from metapage */
HnswGetMetaPageInfo(index, &vacuumstate->m, NULL);