Re: stats collector suddenly causing lots of IO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 16, 2010 at 11:23 AM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
> Josh Kupershmidt <schmiddy@xxxxxxxxx> writes:
>> I'm not sure whether this is related to the stats collector problems
>> on this machine, but I noticed alarming table bloat in the catalog
>> tables pg_attribute, pg_attrdef, pg_depend, and pg_type.
>
> Hmm.  That makes me wonder if autovacuum is functioning properly at all.
> What does pg_stat_all_tables show for the last vacuum and analyze times
> of those tables?  Try something like
>
> select relname,n_live_tup,n_dead_tup,last_vacuum,last_autovacuum,last_analyze,last_autoanalyze from pg_stat_all_tables where schemaname = 'pg_catalog' order by 1;
>

Output attached. Note that I ran pg_stat_reset() a few days ago.
Josh
# select relname,n_live_tup,n_dead_tup,last_vacuum,last_autovacuum,last_analyze,last_autoanalyze from pg_stat_all_tables where schemaname = 'pg_catalog' order by 1;
     relname      | n_live_tup | n_dead_tup | last_vacuum |        last_autovacuum        | last_analyze |       last_autoanalyze        
------------------+------------+------------+-------------+-------------------------------+--------------+-------------------------------
 pg_aggregate     |          0 |          0 |             |                               |              | 
 pg_am            |          0 |          0 |             |                               |              | 
 pg_amop          |          0 |          0 |             |                               |              | 
 pg_amproc        |          0 |          0 |             |                               |              | 
 pg_attrdef       |          2 |    3527675 |             |                               |              | 
 pg_attribute     |         56 |   12771286 |             |                               |              | 
 pg_auth_members  |         11 |          0 |             |                               |              | 
 pg_authid        |         16 |          2 |             |                               |              | 
 pg_autovacuum    |          0 |          0 |             |                               |              | 
 pg_cast          |          0 |          0 |             |                               |              | 
 pg_class         |      30191 |     155416 |             | 2010-04-15 21:14:06.826358+00 |              | 2010-04-15 21:14:06.826358+00
 pg_constraint    |       2435 |        701 |             | 2010-04-15 16:13:33.92506+00  |              | 2010-04-15 16:13:33.92506+00
 pg_conversion    |          0 |          0 |             |                               |              | 
 pg_database      |          0 |          0 |             |                               |              | 
 pg_depend        |         55 |    4961774 |             |                               |              | 
 pg_description   |          0 |          0 |             |                               |              | 
 pg_enum          |          0 |          0 |             |                               |              | 
 pg_index         |       4603 |       2272 |             | 2010-04-15 16:18:21.289279+00 |              | 2010-04-15 16:18:21.289279+00
 pg_inherits      |          2 |          0 |             |                               |              | 
 pg_language      |          0 |          0 |             |                               |              | 
 pg_largeobject   |          0 |          0 |             |                               |              | 
 pg_listener      |         37 |     117512 |             |                               |              | 
 pg_namespace     |          0 |          0 |             |                               |              | 
 pg_opclass       |          0 |          0 |             |                               |              | 
 pg_operator      |          0 |          0 |             |                               |              | 
 pg_opfamily      |          0 |          0 |             |                               |              | 
 pg_pltemplate    |          0 |          0 |             |                               |              | 
 pg_proc          |          0 |          0 |             |                               |              | 
 pg_rewrite       |          4 |          0 |             |                               |              | 
 pg_shdepend      |        717 |     172806 |             | 2010-04-15 16:56:26.296809+00 |              | 2010-04-15 16:56:26.296809+00
 pg_shdescription |          0 |          0 |             |                               |              | 
 pg_statistic     |          0 |          0 |             |                               |              | 
 pg_tablespace    |          0 |          0 |             |                               |              | 
 pg_trigger       |       7021 |       1232 |             | 2010-04-15 16:24:55.054294+00 |              | 2010-04-15 16:24:55.054294+00
 pg_ts_config     |          0 |          0 |             |                               |              | 
 pg_ts_config_map |          0 |          0 |             |                               |              | 
 pg_ts_dict       |          0 |          0 |             |                               |              | 
 pg_ts_parser     |          0 |          0 |             |                               |              | 
 pg_ts_template   |          0 |          0 |             |                               |              | 
 pg_type          |       1336 |     342651 |             | 2010-04-15 17:18:36.05242+00  |              | 2010-04-15 17:18:36.05242+00
(40 rows)

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux