Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id D48949FB70F for ; Tue, 19 Jun 2007 18:33:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 99962-02 for ; Tue, 19 Jun 2007 18:33:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 35B759FB5C7 for ; Tue, 19 Jun 2007 18:33:54 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l5JLXdxj016442; Tue, 19 Jun 2007 17:33:39 -0400 (EDT) To: Kurt Overberg cc: Chris Browne , pgsql-performance@postgresql.org Subject: Re: Maintenance question / DB size anomaly... In-reply-to: <1FF54A1D-9085-4C9B-81F3-D860FB132D44@hotdogrecords.com> References: <607iq0dlns.fsf@dba2.int.libertyrms.com> <1FF54A1D-9085-4C9B-81F3-D860FB132D44@hotdogrecords.com> Comments: In-reply-to Kurt Overberg message dated "Tue, 19 Jun 2007 13:13:23 -0400" Date: Tue, 19 Jun 2007 17:33:39 -0400 Message-ID: <16441.1182288819@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/390 X-Sequence-Number: 25423 Kurt Overberg writes: > mydb # vacuum verbose _my_cluster.sl_log_1 ; > INFO: "sl_log_1": found 455001 removable, 309318 nonremovable row > versions in 13764 pages > DETAIL: 0 dead row versions cannot be removed yet. Hmm. So you don't have a long-running-transactions problem (else that DETAIL number would have been large). What you do have is a failure to vacuum sl_log_1 on a regular basis (because there are so many dead/removable rows). I suspect also some sort of Slony problem, because AFAIK a properly operating Slony system shouldn't have that many live rows in sl_log_1 either --- don't they all represent as-yet-unpropagated events? I'm no Slony expert though. You probably should ask about that on the Slony lists. > ...I then checked the disk and those pages are still there. Yes, regular VACUUM doesn't try very hard to shorten the disk file. > Would a VACUUM FULL take care of this? It would, but it will take an unpleasantly long time with so many live rows to reshuffle. I'd advise first working to see if you can get the table down to a few live rows. Then a VACUUM FULL will be a snap. Also, you might want to do REINDEX after VACUUM FULL to compress the indexes --- VACUUM FULL isn't good at that. regards, tom lane