X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id B712D9DC819 for ; Thu, 23 Feb 2006 17:39:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77420-03 for ; Thu, 23 Feb 2006 17:39:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 296A99DC801 for ; Thu, 23 Feb 2006 17:39:24 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k1NLdO2B026140; Thu, 23 Feb 2006 16:39:24 -0500 (EST) To: Robin Iddon cc: pgsql-admin@postgresql.org Subject: Re: 8.0.3 pg_autovacuum doesn't clear out stats table? In-reply-to: <43FE0723.3070608@edesix.com> References: <43FD7312.5080701@edesix.com> <43FDF046.2050609@zeut.net> <43FDFF9A.90603@edesix.com> <43FE0723.3070608@edesix.com> Comments: In-reply-to Robin Iddon message dated "Thu, 23 Feb 2006 19:04:03 +0000" Date: Thu, 23 Feb 2006 16:39:24 -0500 Message-ID: <26139.1140730764@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.111 required=5 tests=[AWL=0.111] X-Spam-Score: 0.111 X-Spam-Level: X-Archive-Number: 200602/292 X-Sequence-Number: 20713 Robin Iddon writes: > The tuples and thresholds for the pg_statistic table look like they > might be the reason it doesn't get vacuumed. The question is, why does > the reltuples on the stats table keep climbing until you do a vacuum > full, at which point they return to (near) zero? No matter what > threshold and scale I set, I am not going to get that table vacuumed > because it's delete/update rate are 0 (it's always inserted to I believe). Quite incorrect --- if that were so, there would be no dead tuples for vacuum to remove, hm? Actually ANALYZE does an update-or-insert-if-not-present fandango. I'm sort of mystified by your report. I can think of several ways that the system might fail to notice that pg_statistic needs vacuuming, but none of them seem to actually occur in the current code, and I don't see any relevant difference in the CVS logs (I admit to being too lazy to build an exact 8.0.3 version to test --- but 8.0.7 seems fine). Can you keep an eye on pg_statistic's entry in the pg_stat_all_tables view for each affected database, and confirm whether the n_tup_upd/ n_tup_del counts are rising over time or not? That would at least narrow down the problem a bit. regards, tom lane