X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 9E25E9DC83F for ; Fri, 3 Mar 2006 16:15:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47496-05 for ; Fri, 3 Mar 2006 16:15:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 1AE109DCAC9 for ; Fri, 3 Mar 2006 16:15:33 -0400 (AST) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Fri, 3 Mar 2006 20:15:31 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 03 Mar 2006 14:15:31 -0600 Subject: Re: pg_dump and diffrent sizes From: Scott Marlowe To: Maciej Piekielniak Cc: pgsql-sql@postgresql.org In-Reply-To: <6810493901.20060303211026@isb.com.pl> References: <6810493901.20060303211026@isb.com.pl> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1141416931.18820.111.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 03 Mar 2006 14:15:31 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.15 required=5 tests=[AWL=0.149, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.15 X-Spam-Level: X-Archive-Number: 200603/82 X-Sequence-Number: 24428 On Fri, 2006-03-03 at 14:10, Maciej Piekielniak wrote: > Hello pgsql-sql, > > I dump db with pg_dump v.8.1.3 on database postgresql server 7.4.7. > Data directory with my db on pg 7.4.7 had 1,8GB and > file with dump had 2,7GB. > Database have blob fields. > > When I restore db on pg 8.1 - data directory have only 1GB, why? I would guess that you have lots of highly compressible text entries, and postgresql is compressing them for you. The difference in size between 7.4 and 8.1 is likely due to unrecycled tuples in the data store. Even with regular vacuuming, some small percentage of dead tuples is normal.