X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 83E09D1E748 for ; Wed, 5 May 2004 15:37:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 89371-06 for ; Wed, 5 May 2004 15:37:28 -0300 (ADT) Received: from outbound.mailhop.org (outbound.mailhop.org [63.208.196.171]) by svr1.postgresql.org (Postfix) with ESMTP id 3241FD1E7C6 for ; Wed, 5 May 2004 15:27:50 -0300 (ADT) Received: from ool-4350c7ad.dyn.optonline.net ([67.80.199.173] helo=[192.168.0.66]) by outbound.mailhop.org with asmtp (TLSv1:AES256-SHA:256) (Exim 4.20) id 1BLR7W-000GnF-AW; Wed, 05 May 2004 14:27:50 -0400 Message-ID: <409931A0.4060608@zeut.net> Date: Wed, 05 May 2004 14:25:36 -0400 From: "Matthew T. O'Connor" User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Boes Cc: PostgreSQL-development Subject: Re: pg_autovacuum misinterpreting reltuples? References: <40925870.50001@nexcerpt.com> In-Reply-To: <40925870.50001@nexcerpt.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mail-Handler: MailHop Outbound by DynDNS.org X-Originating-IP: 67.80.199.173 X-Report-Abuse-To: abuse@dyndns.org (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: zeut X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=RCVD_IN_NJABL, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200405/242 X-Sequence-Number: 53320 Jeff Boes wrote: > We noticed that one of our high-volume insert tables was being vacuumed > every time pg_autovacuum woke up. (I"m running it with the default > threshold values, and a 900-second sleep cycle.) The table has a few > million rows in it. With "debug = 2" on, here's what the pg_autovacuum > log reports for this table: > > [2004-04-30 09:32:11 AM] table name: nexcerpt."public"."links" > [2004-04-30 09:32:11 AM] relid: 1014188; relisshared: 0 > [2004-04-30 09:32:11 AM] reltuples: 3; relpages: 118888 > > Note that "reltuples" is being reported as "3", which seems a bit low. Aha! > > # select reltuples from pg_class where relname = 'links'; > reltuples > ------------- > 3.32127e+06 > (1 row) > > Is it possible that pg_autovacuum sees this value as "3"? Or is it just > mis-formatting the value in the log? Yes. This is a known bug inside of pg_autovacuum, it is fixed inside of CVS, and will be released with 7.4.3 (whenever that happens, hopefully soon since I'm getting lots of reports for this bug). Please downlooad pg_autovacuum from CVS and compile by hand for the time being. Matthew O'Connor