X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 86746D6D8F for ; Tue, 23 Aug 2005 01:42:17 -0300 (ADT) 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 66035-02 for ; Tue, 23 Aug 2005 04:42:14 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 08375D6D78 for ; Tue, 23 Aug 2005 01:42:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j7N4g9RQ028372; Tue, 23 Aug 2005 00:42:09 -0400 (EDT) To: Alan Stange Cc: pgsql-performance@postgresql.org Subject: Re: unused item pointers? In-reply-to: <430A8F30.7050706@rentec.com> References: <430A8F30.7050706@rentec.com> Comments: In-reply-to Alan Stange message dated "Mon, 22 Aug 2005 22:51:28 -0400" Date: Tue, 23 Aug 2005 00:42:09 -0400 Message-ID: <28371.1124772129@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200508/336 X-Sequence-Number: 14083 Alan Stange writes: > INFO: "tbltimeseries": found 8610108 removable, 26165807 nonremovable > row versions in 5744789 pages > DETAIL: 0 dead row versions cannot be removed yet. > There were 235555635 unused item pointers. > 0 pages are entirely empty. The item pointers themselves are not very interesting --- at 4 bytes apiece, they're only accounting for 2% of the table space. However the fact that there are nearly 10x more unused than used ones suggests that this table is suffering a pretty serious bloat problem. Assuming constant-width rows in the table, that implies something like 90% of the space in the table is unused. (contrib/pgstattuple might be useful to confirm this estimate.) VACUUM FULL, or perhaps better CLUSTER, would get you out of that. And yes, you will need to vacuum more often afterwards if you want to keep the bloat under control. regards, tom lane