mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Implement "fastupdate" support for GIN indexes, in which we try to accumulate
multiple index entries in a holding area before adding them to the main index structure. This helps because bulk insert is (usually) significantly faster than retail insert for GIN. This patch also removes GIN support for amgettuple-style index scans. The API defined for amgettuple is difficult to support with fastupdate, and the previously committed partial-match feature didn't really work with it either. We might eventually figure a way to put back amgettuple support, but it won't happen for 8.4. catversion bumped because of change in GIN's pg_am entry, and because the format of GIN indexes changed on-disk (there's a metapage now, and possibly a pending list). Teodor Sigaev
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.133 2009/01/22 20:16:01 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.134 2009/03/24 20:17:13 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -496,6 +496,28 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt,
|
||||
/* We skip to here if there were no analyzable columns */
|
||||
cleanup:
|
||||
|
||||
/* If this isn't part of VACUUM ANALYZE, let index AMs do cleanup */
|
||||
if (!vacstmt->vacuum)
|
||||
{
|
||||
for (ind = 0; ind < nindexes; ind++)
|
||||
{
|
||||
IndexBulkDeleteResult *stats;
|
||||
IndexVacuumInfo ivinfo;
|
||||
|
||||
ivinfo.index = Irel[ind];
|
||||
ivinfo.vacuum_full = false;
|
||||
ivinfo.analyze_only = true;
|
||||
ivinfo.message_level = elevel;
|
||||
ivinfo.num_heap_tuples = -1; /* not known for sure */
|
||||
ivinfo.strategy = vac_strategy;
|
||||
|
||||
stats = index_vacuum_cleanup(&ivinfo, NULL);
|
||||
|
||||
if (stats)
|
||||
pfree(stats);
|
||||
}
|
||||
}
|
||||
|
||||
/* Done with indexes */
|
||||
vac_close_indexes(nindexes, Irel, NoLock);
|
||||
|
||||
|
Reference in New Issue
Block a user