mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Index FSMs needs to be vacuumed as well. Report by Jeff Davis.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/gin/ginvacuum.c,v 1.22 2008/09/30 10:52:10 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/gin/ginvacuum.c,v 1.23 2008/10/06 08:04:11 heikki Exp $
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -744,6 +744,9 @@ ginvacuumcleanup(PG_FUNCTION_ARGS)
|
||||
totFreePages = totFreePages - stats->pages_removed;
|
||||
}
|
||||
|
||||
/* Finally, vacuum the FSM */
|
||||
IndexFreeSpaceMapVacuum(info->index);
|
||||
|
||||
stats->pages_free = totFreePages;
|
||||
|
||||
if (needLock)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.37 2008/09/30 10:52:10 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.38 2008/10/06 08:04:11 heikki Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -619,6 +619,9 @@ gistvacuumcleanup(PG_FUNCTION_ARGS)
|
||||
totFreePages = totFreePages - stats->std.pages_removed;
|
||||
}
|
||||
|
||||
/* Finally, vacuum the FSM */
|
||||
IndexFreeSpaceMapVacuum(info->index);
|
||||
|
||||
/* return statistics */
|
||||
stats->std.pages_free = totFreePages;
|
||||
if (needLock)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.162 2008/09/30 10:52:10 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.163 2008/10/06 08:04:11 heikki Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -574,6 +574,9 @@ btvacuumcleanup(PG_FUNCTION_ARGS)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user