Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7D589B5DBDA for ; Tue, 24 May 2011 23:48:02 -0300 (ADT) 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 61187-06 for ; Wed, 25 May 2011 02:47:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E2B95B5D801 for ; Tue, 24 May 2011 23:47:50 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p4P2lnA3025018; Tue, 24 May 2011 22:47:49 -0400 (EDT) To: Florian Helmberger cc: pgsql-admin@postgresql.org Subject: Re: pg_class reltuples/relpages not updated by autovacuum/vacuum In-reply-to: <4DD28F73.6010108@25th-floor.com> References: <4DD28F73.6010108@25th-floor.com> Comments: In-reply-to Florian Helmberger message dated "Tue, 17 May 2011 17:08:35 +0200" Date: Tue, 24 May 2011 22:47:49 -0400 Message-ID: <25017.1306291669@sss.pgh.pa.us> From: Tom Lane 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: 201105/164 X-Sequence-Number: 37601 Florian Helmberger writes: > I'm running a production database with PostgreSQL 9.0.3 (64-bit) on > Debian 5.0.4 and have an issue with a TOAST table and far to frequent > autovacuum runs. > I think I've pinned the problem down to the values pg_class holds for > the affected TOAST table: > relpages | 433596 > reltuples | 1868538 > These values are significantly too low. Interestingly, the autovacuum > logout reports the correct values: > pages: 0 removed, 34788136 remain > tuples: 932487 removed, 69599038 remain > but these aren't stored in pg_class after each run. That's exceedingly weird. Do the pg_stat_all_tables columns update after autovacuums on that table? regards, tom lane