mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Allow autoanalyze to add pages deleted from pending list to FSM
Commit e956808328 introduces adding pages
to FSM for ordinary insert, but autoanalyze was able just cleanup
pending list without adding to FSM.
Also fix double call of IndexFreeSpaceMapVacuum() during ginvacuumcleanup()
Report from Fujii Masao
Patch by me
Review by Jeff Janes
This commit is contained in:
@@ -544,7 +544,7 @@ ginbulkdelete(PG_FUNCTION_ARGS)
|
||||
/* Yes, so initialize stats to zeroes */
|
||||
stats = (IndexBulkDeleteResult *) palloc0(sizeof(IndexBulkDeleteResult));
|
||||
/* and cleanup any pending inserts */
|
||||
ginInsertCleanup(&gvs.ginstate, true, stats);
|
||||
ginInsertCleanup(&gvs.ginstate, true, false, stats);
|
||||
}
|
||||
|
||||
/* we'll re-count the tuples each time */
|
||||
@@ -659,7 +659,7 @@ ginvacuumcleanup(PG_FUNCTION_ARGS)
|
||||
if (IsAutoVacuumWorkerProcess())
|
||||
{
|
||||
initGinState(&ginstate, index);
|
||||
ginInsertCleanup(&ginstate, true, stats);
|
||||
ginInsertCleanup(&ginstate, true, true, stats);
|
||||
}
|
||||
PG_RETURN_POINTER(stats);
|
||||
}
|
||||
@@ -672,7 +672,7 @@ ginvacuumcleanup(PG_FUNCTION_ARGS)
|
||||
{
|
||||
stats = (IndexBulkDeleteResult *) palloc0(sizeof(IndexBulkDeleteResult));
|
||||
initGinState(&ginstate, index);
|
||||
ginInsertCleanup(&ginstate, true, stats);
|
||||
ginInsertCleanup(&ginstate, true, false, stats);
|
||||
}
|
||||
|
||||
memset(&idxStat, 0, sizeof(idxStat));
|
||||
|
||||
Reference in New Issue
Block a user