Re: Logging pg_autovacuum

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Larry Rosenman <lrosenman(at)pervasive(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Subject: Re: Logging pg_autovacuum
Date: 2006-04-28 20:15:36
Message-ID: 20060428201536.GE15566@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 28, 2006 at 04:08:41PM -0400, Robert Treat wrote:
> The first is to add a column(s) to pg_class to hold last vaccum/analyze time
> for each table. The upsides would be that this puts the information in a
> readily accessable place that can be viewed from third party tools and
> queried against for easier management along with accomplishing what the
> current logging is giving you.

You know, rather than adding new columns to pg_class, why not extend
the stats collector to collect this information. This seems to fall
well within its mandate and it already has the necessary infrastructure
to store info like this. The people likely to want this sort of info
are likely to be running the stats collector anyway. The GUC then
becomes.

stats_autovacuum= on

No more fiddling with log levels or parsing log file, just:

select <the info you want> from pg_stats_autovacuum;

If this table is empty, it isn't running. How often do you want to know
if it was running 5 hours ago?

Thoughts?
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-04-28 20:16:22 Re: Logging pg_autovacuum
Previous Message Larry Rosenman 2006-04-28 20:12:04 Re: Logging pg_autovacuum