From: Stefano Nichele <stefano.nichele@gmail.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: tracking last_autovacuum
Date: Thu, 18 Dec 2008 14:13:41 +0100
Message-ID: <494A4C85.9090700@gmail.com> (raw)
In-Reply-To: <20081218130730.GC5447@alvh.no-ip.org>
References: <494A49CA.4050905@gmail.com>
<20081218130730.GC5447@alvh.no-ip.org>
Yes, i could do that but it seems simpler (to me) with a trigger than
looking at the recent changes records and store them somewhere.
ste
Alvaro Herrera wrote:
> Stefano Nichele escribió:
>
>> Hi All,
>> in pg_stat_all_tables, the fields last_autovacuum, last_autoanalyze are
>> updated any time autovacuum vacuums a table.
>> I would like to keep an history of these activities in order to see when
>> and how many times any single table is vacuumed.
>>
>> Is there any features that can help me ? (I'm using postgres 8.2.9)
>>
>> What about creating a trigger on pg_stat_all_tables and storing the
>> required info in another table (like autovacuum_history) ?
>>
>
> I guess you could run a query once every autovacuum_naptime and have it
> save aside all those entries from pg_stat_all_tables that have recent
> dates into a history table.
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: stefano.nichele@gmail.com, alvherre@commandprompt.com
Subject: Re: tracking last_autovacuum
In-Reply-To: <494A4C85.9090700@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox