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 AEDDED1E6AB for ; Fri, 30 Apr 2004 10:45:02 -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 94532-04 for ; Fri, 30 Apr 2004 10:44:45 -0300 (ADT) Received: from yapok.nexcerpt.com (mail.nexcerpt.com [64.147.202.2]) by svr1.postgresql.org (Postfix) with ESMTP id 14131D1E60A for ; Fri, 30 Apr 2004 10:44:41 -0300 (ADT) Received: from nexcerpt.com (DSL-NE-124.qtm.net [216.163.37.124]) (authenticated bits=0) by yapok.nexcerpt.com (8.12.8/8.12.8) with ESMTP id i3UDihP2003241 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=OK) for ; Fri, 30 Apr 2004 09:44:44 -0400 Message-ID: <40925870.50001@nexcerpt.com> Date: Fri, 30 Apr 2004 09:45:21 -0400 From: Jeff Boes Organization: Nexcerpt, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: PostgreSQL-development Subject: pg_autovacuum misinterpreting reltuples? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/215 X-Sequence-Number: 53293 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? -- Jeff Boes vox 269.226.9550 ext 24 Database Engineer fax 269.349.9076 Nexcerpt, Inc. http://www.nexcerpt.com ...Nexcerpt... Extend your Expertise