Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id C8DBA9F9989 for ; Sat, 10 Nov 2007 12:27:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 64310-06 for ; Sat, 10 Nov 2007 12:27:13 -0400 (AST) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by postgresql.org (Postfix) with ESMTP id A16839F9713 for ; Sat, 10 Nov 2007 12:27:19 -0400 (AST) Received: from [192.168.0.251] ([71.251.196.74]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JRA001NPTP73KP2@vms046.mailsrvcs.net> for pgsql-performance@postgresql.org; Sat, 10 Nov 2007 10:27:08 -0600 (CST) Date: Sat, 10 Nov 2007 11:27:07 -0500 From: Jean-David Beyer Subject: Curious about dead rows. To: pgsql performance Message-id: <4735DBDB.5050208@verizon.net> Organization: Institute for Regimented Whimsey MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Enigmail-Version: 0.94.0.0 User-Agent: Thunderbird 1.5.0.9 (X11/20070317) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/162 X-Sequence-Number: 27577 I am doing lots of INSERTs on a table that starts out empty (I did a TRUNCATE on it). I am not, AFAIK, doing DELETEs or UPDATEs. Autovacuum is on. I moved logging up to debug2 level to see what was going on, and I get things like this: "vl_as": scanned 3000 of 5296 pages, containing 232944 live rows and 1033 dead rows; 3000 rows in sample, 411224 estimated total rows A little later, it says: "vl_as": scanned 3000 of 6916 pages, containing 233507 live rows and 493 dead rows; 3000 rows in sample, 538311 estimated total rows (I suppose that means autovacuum is working.) Is this normal, or have I got something wrong? Why so many dead rows when just doing inserts? It is not that I think the number is too high, considering the number of rows in the table at the point where I copied this line. It is just that I do not understand why there are any. I could easily understand it if I were doing UPDATEs. postgresql-8.1.9-1.el5 -- .~. Jean-David Beyer Registered Linux User 85642. /V\ PGP-Key: 9A2FC99A Registered Machine 241939. /( )\ Shrewsbury, New Jersey http://counter.li.org ^^-^^ 11:15:01 up 18 days, 4:33, 4 users, load average: 6.18, 5.76, 5.26