Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A7E3E2E2D35 for ; Tue, 13 Nov 2007 15:51:24 -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 42895-07 for ; Tue, 13 Nov 2007 15:51:15 -0400 (AST) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by postgresql.org (Postfix) with ESMTP id 2AD082E072B for ; Tue, 13 Nov 2007 15:51:13 -0400 (AST) Received: from [192.168.0.251] ([71.251.196.74]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JRG004VFN4ZHSE3@vms040.mailsrvcs.net> for pgsql-performance@postgresql.org; Tue, 13 Nov 2007 13:51:00 -0600 (CST) Date: Tue, 13 Nov 2007 14:50:59 -0500 From: Jean-David Beyer Subject: Re: Curious about dead rows. In-reply-to: <20071113152111.GG11563@crankycanuck.ca> To: pgsql-performance@postgresql.org Message-id: <473A0023.5020609@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 References: <47366782.7050600@verizon.net> <20071112163223.GP32349@crankycanuck.ca> <4738825F.6050106@verizon.net> <20071112171805.GQ32349@crankycanuck.ca> <47389504.4020700@verizon.net> <20071112185218.GS32349@crankycanuck.ca> <4738A2EC.9090500@verizon.net> <20071112190833.GY32349@crankycanuck.ca> <4739BD65.9070605@verizon.net> <20071113152111.GG11563@crankycanuck.ca> User-Agent: Thunderbird 1.5.0.9 (X11/20070317) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/197 X-Sequence-Number: 27612 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andrew Sullivan wrote: > Please don't drop the list, as someone else may see something. > > On Tue, Nov 13, 2007 at 10:06:13AM -0500, Jean-David Beyer wrote: >> OK. I turned logging from "none" to "mod" and got a gawdawful lot of stuff. > > Yes. > >> Then I ran it and got all the inserts. Using >> grep -i delete file >> grep -i update file >> grep -i rollback file > > How about ERROR? $ grep -i error Tue.log $ > >> 2007-11-13 08:11:20 EST DEBUG: "vl_ranks": scanned 540 of 540 pages, >> containing 67945 live rows and 554 dead rows; 3000 rows in sample, 67945 >> estimated total rows > > If there are dead rows, something is producing them. Either INSERT is > firing a trigger that is doing something there (you won't see an UPDATE in > that case), or else something else is causing INSERTs to fail. I have no triggers in that database. I do have two sequences. List of relations Schema | Name | Type | Owner - --------+------------------------+----------+--------- public | company_company_id_seq | sequence | jdbeyer public | source_source_id_seq | sequence | jdbeyer stock=> \d company_company_id_seq Sequence "public.company_company_id_seq" Column | Type - ---------------+--------- sequence_name | name last_value | bigint increment_by | bigint max_value | bigint min_value | bigint cache_value | bigint log_cnt | bigint is_cycled | boolean is_called | boolean stock=> \d source_source_id_seq Sequence "public.source_source_id_seq" Column | Type - ---------------+--------- sequence_name | name last_value | bigint increment_by | bigint max_value | bigint min_value | bigint cache_value | bigint log_cnt | bigint is_cycled | boolean is_called | boolean but they are not used after the last VACUUM FULL ANALYZE - -- .~. Jean-David Beyer Registered Linux User 85642. /V\ PGP-Key: 9A2FC99A Registered Machine 241939. /( )\ Shrewsbury, New Jersey http://counter.li.org ^^-^^ 14:40:01 up 21 days, 7:58, 2 users, load average: 4.33, 4.43, 4.39 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org iD8DBQFHOgAiPtu2XpovyZoRApmZAKDH2JaSlxH+DT1rs8E110P9L4r5+ACZAYGY z2SQtUvRDHlpCwePE2cskX4= =xS8V -----END PGP SIGNATURE-----