Re: pg_stat_get_last_vacuum_time(): why non-FULL?

From: Martín Marqués <martin(dot)marques(at)gmail(dot)com>
To: CR Lender <crlender(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_stat_get_last_vacuum_time(): why non-FULL?
Date: 2013-03-28 12:11:09
Message-ID: CABeG9Luqrn6fGVYDaEMk+8ar4aBjXSRzPeg_WUg14Z1Mh0V4Ug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2013/3/27 CR Lender <crlender(at)gmail(dot)com>:
>
>> Also, a VACUUM FULL is an extreme form of
>> maintenance which should rarely be needed; if you find that you
>> need to run VACUUM FULL, something is probably being done wrong
>> which should be fixed so that you don't need to continue to do such
>> extreme maintenance.
>
> In this case I was only trying to make sense of an existing database
> (8.3). The statistics in pg_stats were way off for some tables, so I
> wanted to see if (auto)vacuum and (auto)analyze were being run.
> pg_stat_all_tables() showed last_autoanalyze at >400 days for some of
> the larger tables. There used to be a weekly cron job with VACUUM FULL
> ANALYZE, and I was trying to find out if that cron job was still active.
>

What's your autovacuum configuration? autovacuum_vacuum_threshold?
autovacuum_analyze_threshold? autovacuum_vacuum_scale_factor?
autovacuum_analyze_scale_factor?

Related to your 400+ days not vacuumed tables, are you sure those
tables have data changes (INSERT/UPDATE/DELETE)? I have some static
tables with over a year of no vacuum (and autovacuum field never ran
on that relation).

What does n_dead_tup show?

--
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gavan Schneider 2013-03-28 12:43:23 Re: Money casting too liberal?
Previous Message salah jubeh 2013-03-28 09:06:13 Re: bloating index, pg_restore