> Benjamin Minshall <minshall@xxxxxxxxxxxxxx> writes: >> Tom Lane wrote: >>> How many tables are visible in the pg_stats views? > >> There are about 15 databases in the cluster each with around 90 tables. >> A count of pg_stats yields between 500 and 800 rows in each database. > > Sorry, I was imprecise. The view "pg_stats" doesn't have anything to do > with the stats collector; what I was interested in was the contents of > the "pg_stat_xxx" and "pg_statio_xxx" views. It'd be enough to check > pg_stat_all_indexes and pg_stat_all_tables, probably. Also, do you have > the 8.1 installation still available to get the comparable counts there? > I checked all 15 databases on both 8.1 and 8.2; they were all quite consistent: pg_stat_all_indexes has about 315 rows per database pg_stat_all_tables has about 260 rows per database The pg_statio_* views match in count to the pg_stat_* views as well. While exploring this problem, I've noticed that one of the frequent insert processes creates a few temporary tables to do post-processing. Is it possible that the stats collector is getting bloated with stats from these short-lived temporary tables? During periods of high activity it could be creating temporary tables as often as two per second.