Re: autovacuum not running - Mailing list pgsql-general

From Tom Lane
Subject Re: autovacuum not running
Date
Msg-id 16235.1188347832@sss.pgh.pa.us
Whole thread Raw
In response to Re: autovacuum not running  (Ben <bench@silentmedia.com>)
List pgsql-general
Ben <bench@silentmedia.com> writes:
> Hm, I assumed it wasn't running because pg_stat_all_tables shows the last
> vacuum from several weeks ago, and this is an active db. Also, I see no
> vacuum activity in the logs. But "show autovacuum" does show it being
> on....

Just to double-check, make sure stats_start_collector and
stats_row_level are on, and confirm that you see the stats collector
process in "ps".  Also, do you have any of the autovac threshold
parameters at nondefault values?

The autovac process doesn't run continuously, so not seeing it in ps
is not proof that there's a problem.  But if pg_stat_all_tables isn't
showing any evidence of vacuums happening, that's probably bad.

> So if it is running after all, how can I track down why things aren't
> getting vacuumed? What log level are the autovacuum logs at?

I think you've gotta crank it up to DEBUG2 or so, which is gonna be
noisy :-(

            regards, tom lane

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Out of Memory - 8.2.4
Next
From: Michael Glaesemann
Date:
Subject: Re: Is there a better way to do this?