totFreePages = totFreePages - stats->pages_removed;
}
+ /* Finally, vacuum the FSM */
+ IndexFreeSpaceMapVacuum(info->index);
+
stats->pages_free = totFreePages;
if (needLock)
totFreePages = totFreePages - stats->std.pages_removed;
}
+ /* Finally, vacuum the FSM */
+ IndexFreeSpaceMapVacuum(info->index);
+
/* return statistics */
stats->std.pages_free = totFreePages;
if (needLock)
btvacuumscan(info, stats, NULL, NULL, 0);
}
+ /* Finally, vacuum the FSM */
+ IndexFreeSpaceMapVacuum(info->index);
+
/*
* During a non-FULL vacuum it's quite possible for us to be fooled by
* concurrent page splits into double-counting some index tuples, so
{
FreeSpaceMapTruncateRel(rel, nblocks);
}
+
+/*
+ * IndexFreeSpaceMapVacuum - scan and fix any inconsistencies in the FSM
+ */
+void
+IndexFreeSpaceMapVacuum(Relation rel)
+{
+ FreeSpaceMapVacuum(rel);
+}
#include "utils/rel.h"
-extern void InitIndexFreeSpaceMap(Relation rel);
-
extern BlockNumber GetFreeIndexPage(Relation rel);
extern void RecordFreeIndexPage(Relation rel, BlockNumber page);
extern void RecordUsedIndexPage(Relation rel, BlockNumber page);
+extern void InitIndexFreeSpaceMap(Relation rel);
extern void IndexFreeSpaceMapTruncate(Relation rel, BlockNumber nblocks);
+extern void IndexFreeSpaceMapVacuum(Relation rel);
#endif /* INDEXFSM_H */