Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DADB264FCE9 for ; Thu, 18 Dec 2008 09:02:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 25263-09 for ; Thu, 18 Dec 2008 09:02:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from a.mail.sonomait.com (a.mail.sonomait.com [64.142.123.30]) by mail.postgresql.org (Postfix) with ESMTP id E655064FCE3 for ; Thu, 18 Dec 2008 09:02:11 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by a.mail.sonomait.com (Postfix) with ESMTP id 2D8321644F0 for ; Thu, 18 Dec 2008 05:02:09 -0800 (PST) X-Virus-Scanned: amavisd-new at Received: from a.mail.sonomait.com ([127.0.0.1]) by localhost (a.mail.sonomait.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id exrM9wbG0lx9 for ; Thu, 18 Dec 2008 05:02:07 -0800 (PST) Received: from [172.18.30.70] (89-96-142-243.ip12.fastwebnet.it [89.96.142.243]) by a.mail.sonomait.com (Postfix) with ESMTP id EB5F216448A for ; Thu, 18 Dec 2008 05:02:06 -0800 (PST) Message-ID: <494A49CA.4050905@gmail.com> Date: Thu, 18 Dec 2008 14:02:02 +0100 From: Stefano Nichele User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: tracking last_autovacuum Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/143 X-Sequence-Number: 30976 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) ? Cheers, ste