Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 9FE1DB61DD6 for ; Fri, 3 Jun 2011 12:11:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 16108-06 for ; Fri, 3 Jun 2011 15:11:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 716CAB5DF2B for ; Fri, 3 Jun 2011 12:11:06 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QSW1g-0000Wo-4H for pgsql-admin@postgresql.org; Fri, 03 Jun 2011 17:11:04 +0200 Received: from frigga.summersault.com ([12.161.105.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Jun 2011 17:11:04 +0200 Received: from mark by frigga.summersault.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Jun 2011 17:11:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Mark Stosberg Subject: surprised to find bloat in insert-only table Date: Fri, 03 Jun 2011 11:10:51 -0400 Lines: 24 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: frigga.summersault.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 X-Enigmail-Version: 1.1.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/15 X-Sequence-Number: 37641 I recently set up partitioning on a table that sees heavy insert traffic. There are never updates or deletes, we just drop the partitions later. It's my understanding that bloat can only appear through updates or deletes, but these partitions are reported to have significant bloat in them. Where else can this come from and how I can I reduce it? I'm using a "bloat" view with 9.0.3 which might the same as this one: https://wiki.postgresql.org/wiki/Show_database_bloat This shows that each index on the table has over a gig of bloat: select distinct(iname), wastedbytes, wastedsize from bloat where wastedbytes > 0 order by wastedbytes DESC limit 20; And this query also shows the same amount of bloat in the table itself: select distinct(tablename), wastedbytes, wastedsize from bloat where wastedbytes > 0 order by wastedbytes DESC limit 10; Mark