X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1E14C329C89 for ; Sat, 18 Sep 2004 17:06:30 +0100 (BST) 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 55533-06 for ; Sat, 18 Sep 2004 16:06:25 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id D9F6A329D20 for ; Sat, 18 Sep 2004 17:06:25 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i8IG6O72004716; Sat, 18 Sep 2004 12:06:24 -0400 (EDT) To: tyagel@yahoo.com Cc: pgsql-general@postgresql.org Subject: Re: Vacuum related question In-reply-to: References: Comments: In-reply-to "G. Thomas Yagel, Jr." message dated "Thu, 16 Sep 2004 12:17:43 -0400" Date: Sat, 18 Sep 2004 12:06:24 -0400 Message-ID: <4715.1095523584@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/864 X-Sequence-Number: 66070 "G. Thomas Yagel, Jr." writes: > After 12 hours I stopped inserting recods and started a "vacuum verbose". > The vacuuming has taken almost 2 hours now and is not even finished. What I > don't understand is why there is so much vacuuming to be done on some tables > that are only being inserted into. As an example, I have pasted the output > from the vacuuming of the pg_largeobject table. You may think you've only inserted, but this output says differently: > INFO: "pg_largeobject": found 18317486 removable, 21326336 nonremovable row > versions in 2119638 pages Those 18 million dead rows didn't appear out of nowhere; they could only have come from deleting or updating large objects (BLOBs). The reason for the multiple index-cleaning cycles is that vacuum_mem was only high enough to remember about 1.4 million dead rows at a time. You could have sped up the process by setting vacuum_mem higher. regards, tom lane