X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 54A1C5636F for ; Wed, 9 Mar 2005 11:27:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76378-10 for ; Wed, 9 Mar 2005 11:27:43 +0000 (GMT) Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227]) by svr1.postgresql.org (Postfix) with ESMTP id 6F1355636A for ; Wed, 9 Mar 2005 11:27:41 +0000 (GMT) Received: from nts-03.mm.eutelsat.org (localhost [127.0.0.1]) by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id j29CUjw24827; Wed, 9 Mar 2005 13:30:45 +0100 Received: from [127.0.0.1] (accesspoint.mm.eutelsat.org [194.214.173.4]) by nts-03.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id j29BRhR11771; Wed, 9 Mar 2005 12:27:43 +0100 Message-ID: <422EDDA2.5000901@bigfoot.com> Date: Wed, 09 Mar 2005 12:27:30 +0100 From: Gaetano Mendola User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Fuhr , "pgsql-performance@postgresql.org" Subject: Re: vacuum full, why multiple times ? References: <422E4B15.60806@bigfoot.com> <20050309021533.GB13883@winnie.fuhr.org> In-Reply-To: <20050309021533.GB13883@winnie.fuhr.org> X-Enigmail-Version: 0.90.1.1 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.157 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/162 X-Sequence-Number: 10867 Michael Fuhr wrote: > On Wed, Mar 09, 2005 at 02:02:13AM +0100, Gaetano Mendola wrote: > > >>Basically I'm noticing that a simple vacuum full is not enough to >>shrink completelly the table: >> >># vacuum full verbose url; >>INFO: vacuuming "public.url" >>INFO: "url": found 268392 removable, 21286 nonremovable row versions in 8563 pages >>DETAIL: 22 dead row versions cannot be removed yet. > > > How busy is the database? I'd guess that each time you run VACUUM, > there are still open transactions that have visibility to the dead > rows, so VACUUM doesn't touch them. Those transactions eventually > complete, and eventually VACUUM FULL does what you're expecting. > I don't know if that's the only possible cause, but I get results > similar to yours if I have transactions open when I run VACUUM. > That was my first tough but it seem strange that 2 dead rows where grabbing 7883 pages, don't you think ? # vacuum full verbose url; INFO: vacuuming "public.url" INFO: "url": found 74 removable, 21266 nonremovable row versions in 8550 pages DETAIL: 2 dead row versions cannot be removed yet. [SNIP] INFO: "url": moved 11 row versions, truncated 8550 to 8504 pages and in the next run: # vacuum full verbose url; INFO: vacuuming "public.url" INFO: "url": found 13 removable, 21264 nonremovable row versions in 8504 pages DETAIL: 0 dead row versions cannot be removed yet. [SNIP] INFO: "url": moved 5666 row versions, truncated 8504 to 621 pages Regards Gaetano Mendola