diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-07-29 19:30:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-07-29 19:30:09 +0000 |
commit | 5d5f1a79e674d5501f70f08bbb9b83d9bbaed319 (patch) | |
tree | 8e07dc9808e8a23029615c9fa6a8a110f9c68567 /src/backend/commands/analyze.c | |
parent | 507b758ad99c0e3a973097299b6b36688e7fec8e (diff) | |
download | postgresql-5d5f1a79e674d5501f70f08bbb9b83d9bbaed319.tar.gz postgresql-5d5f1a79e674d5501f70f08bbb9b83d9bbaed319.zip |
Clean up a number of autovacuum loose ends. Make the stats collector
track shared relations in a separate hashtable, so that operations done
from different databases are counted correctly. Add proper support for
anti-XID-wraparound vacuuming, even in databases that are never connected
to and so have no stats entries. Miscellaneous other bug fixes.
Alvaro Herrera, some additional fixes by Tom Lane.
Diffstat (limited to 'src/backend/commands/analyze.c')
-rw-r--r-- | src/backend/commands/analyze.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index 03783f121e2..bd32c8c841e 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.87 2005/07/14 05:13:39 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.88 2005/07/29 19:30:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -317,7 +317,9 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt) * a zero-column table. */ if (!vacstmt->vacuum) - pgstat_report_analyze(RelationGetRelid(onerel), 0, 0); + pgstat_report_analyze(RelationGetRelid(onerel), + onerel->rd_rel->relisshared, + 0, 0); vac_close_indexes(nindexes, Irel, AccessShareLock); relation_close(onerel, AccessShareLock); @@ -436,8 +438,9 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt) } /* report results to the stats collector, too */ - pgstat_report_analyze(RelationGetRelid(onerel), totalrows, - totaldeadrows); + pgstat_report_analyze(RelationGetRelid(onerel), + onerel->rd_rel->relisshared, + totalrows, totaldeadrows); } /* Done with indexes */ |