Re: Autvacuum and Analyze stats?

From: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
To: Machiel Richards <machielr(at)rdc(dot)co(dot)za>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Autvacuum and Analyze stats?
Date: 2010-04-13 12:41:38
Message-ID: 1271162498.2284.125.camel@hp-laptop2.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, 2010-04-13 at 12:03 +0200, Machiel Richards wrote:

> Is there a way to confirm when last the autovacuum ran

Check pg_stat_user_tables (or pg_stat_{all,sys,user}_tables. They
include autovacuum info.

> (and if so was there any errors).

If you are running 8.3+, you may enable autovacum logging by setting
log_autovacuum_min_duration to 0, and check for any issues.

> The auto vacuum is configured to run every 60 seconds, however the
> check_postgres package states that the last vacuum was 12 days ago and
> I need to see if I can confirm this manually.

autovacuum updates last_autovacuum (and last_autoanalyze) columns. The
columns you mention are last_vacuum (and last_analyze), and they are
updated when manual vacuum is run. So you are using last_vacuum
parameter. You may also want to use last_autovacuum parameter of
check_postgres.

> I am also trying to find out if there is a way of seeing
> when last a table / database had been analyzed if ever.

See above (pg_stat_user_tables)

-HTH.
--
Devrim GÜNDÜZ
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
PostgreSQL RPM Repository: http://yum.pgrpms.org
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Jasen Betts 2010-04-13 12:58:42 Re: Partitioning for query performance
Previous Message Ognjen Blagojevic 2010-04-13 10:26:46 Re: Getting started