Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id DDC671336B42 for ; Wed, 10 Nov 2010 14:42:56 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 73128-04 for ; Wed, 10 Nov 2010 18:42:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailgate.iii.com (mailgate.iii.com [205.227.88.3]) by mail.postgresql.org (Postfix) with ESMTP id 8E24B1337B2F for ; Wed, 10 Nov 2010 14:42:49 -0400 (AST) Received: from mailhub.iii.com (mailhub [10.1.2.3]) by mailgate.iii.com (8.13.6/8.13.6) with ESMTP id oAAIZPBk029739 for ; Wed, 10 Nov 2010 10:35:25 -0800 (PST) Received: from [10.1.7.210] ([10.1.7.210]) by mailhub.iii.com (8.13.6/8.13.6) with ESMTP id oAAIjkOc002962 for ; Wed, 10 Nov 2010 10:45:46 -0800 (PST) Message-ID: <4CDAE7AE.3040105@iii.com> Date: Wed, 10 Nov 2010 10:42:54 -0800 From: Dinesh Bhandary Reply-To: dbhandary@iii.com Organization: Innovative Interfaces User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: auto vacuum 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=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/81 X-Sequence-Number: 36047 Hi All - We run both postgres 8.2.3 and 8.4.1 in unix environment. We have auto vacuum configured and I am trying to find out its effectiveness. Here are a couple of questions: 1) I'm running a query that compares actual table count with the pg_stat table count ( pg_stat_user_tables.n_live_tup) to make sure there is not a huge difference between two. If the difference is small or within the analyze threshold I know vacuum analyze is running and doing its work. I am seeing that truncate does not trigger autovacuum analayze like delete does and pg_stat_user_tables.n_live_tup is not updated ( please correct me If I am wrong). Does it mean I have to run analyze manually whenever I truncate a table or system has a way of tracking. 2) In postgres 8.2 pg_stat_user_tables.n_live_tup field is missing. Is there a way to get table counts as the system sees it in 8.2? Thanks. Dinesh