[check_postgres] check_postgres_last_autovacuum
Robert Treat
xzilla at users.sourceforge.net
Fri Jul 11 18:13:48 UTC 2008
On Thursday 10 July 2008 10:31:54 Peter Sheats wrote:
> I have been having some difficulties with check_postgres_last_autovacuum
> and check_postgres_last_autoanalyze.
>
> I have autovacuum turned on but I get this:
>
> POSTGRES_LAST_AUTOVACUUM CRITICAL: DB "dbname" (host:192.168.144.103)
> public.people_profile: 11:41 June 04, 2008 (3105742 s) | time=0.04
> public.people_profile=3105742 public.snapboard_category=3104961
> public.features_neighborhood=3104060 pg_catalog.pg_depend=3064312
> pg_catalog.pg_attribute=2660778 dev.pb_condo_info=2226640
> public.features_parcel=1664712 public.auth_message=760961
> pg_catalog.pg_class=586874 pg_catalog.pg_shdepend=586454
> pg_catalog.pg_trigger=586454 _backyardpost_replication.sl_log_1=375451
> public.assets_story=158978 _backyardpost_replication.sl_registry=72315
> _backyardpost_replication.sl_event=69289
> _backyardpost_replication.sl_confirm=69289
> _backyardpost_replication.sl_seqlog=69289
> _backyardpost_replication.sl_log_2=69288 pg_catalog.pg_statistic=48
> pg_catalog.pg_listener=48 dev.daily_realestate_updates=45
> public.people_person=43 public.tracking_visit=40
> public.tracking_visit_pageviews=37 public.crime_officer=36
> public.features_address=22 public.crime_arrest=19
> public.crime_arrest_charges=18 public.auth_user=18
>
> I believe tables that never change (no inserts, deletes, or updates) will
> never get autovaccuumed since there is no need. So is this what is
> happening? Will this be reported as a warning or critical even if that
> table didn¹t need to be vacuumed?
That's what it looks like to me. ISTR there were two desired behaviors from
the vacuum/analyze checks; one is that you can check if any specific table
has not been analyze/vacuumed within a set time frame, and the other is that
you want to verify the autovacuum/autoanalyze have worked on *any* table
within a given timeframe. Looking at the code, it seems only the former check
is supported, and not the latter (which probably could be by support bu
changing the current check to order by 3 desc, though I didn't look too close
at the code).
--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
More information about the Check_postgres
mailing list