Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A70DF650276 for ; Thu, 14 Aug 2008 20:26:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 34476-05 for ; Thu, 14 Aug 2008 20:26:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outbound.icp-qv1-irony-out4.iinet.net.au (outbound.icp-qv1-irony-out4.iinet.net.au [203.59.1.150]) by postgresql.org (Postfix) with ESMTP id 532E7650259 for ; Thu, 14 Aug 2008 20:26:22 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAO5bpEh8q5Nq/2dsb2JhbACHd4NXhTOlY4FV X-IronPort-AV: E=Sophos;i="4.32,211,1217779200"; d="scan'208";a="259464139" Received: from unknown (HELO mail.outtalimits.com.au) ([124.171.147.106]) by outbound.icp-qv1-irony-out4.iinet.net.au with ESMTP; 15 Aug 2008 07:26:18 +0800 Received: from www.outtalimits.com.au (localhost [127.0.0.1]) by mail.outtalimits.com.au (Postfix) with ESMTP id 4AF102B6405C; Fri, 15 Aug 2008 09:26:18 +1000 (EST) MIME-Version: 1.0 Date: Fri, 15 Aug 2008 09:26:18 +1000 From: To: Thomas Jacob Cc: pgsql-admin@postgresql.org Subject: Re: DB Dump Size In-Reply-To: <20080814083003.GA456@internet24.de> References: <326684d8c021f4afb82f8e921f9e0c40@127.0.0.1> <20080814083003.GA456@internet24.de> Message-ID: <02f4fac97d67bb4a1cee604724c8d62d@127.0.0.1> X-Sender: steve@outtalimits.com.au User-Agent: RoundCube Webmail/0.2a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/59 X-Sequence-Number: 29904 G'day, I am just running a straight pg_dump with no options. With the -Fc option the DB size is reduced to about: 700MB Is the -Fc a compressed format? Are there any limitations or side effects to using this output, is it slower?? etc etc. Can this output be restored via the normal method of: psql dbname < sql.dump Thanks. Steve On Thu, 14 Aug 2008 10:30:07 +0200, Thomas Jacob wrote: > On Thu, Aug 14, 2008 at 12:06:53PM +1000, steve@outtalimits.com.au wrote: >> Hi all, >> >> I am curious as to why a pg dump of database "name" is 2.9gig. But is >> measured at 1.66gig by: >> SELECT pg_database_size(pg_database.datname) AS db_size FROM pg_database >> WHERE pg_database.datname='name' ; >> >> This dump was about 1 gig around 12 months ago. > > Which options do you use for pg_dump? And what version of PosgreSQL are > you running? > > In general it's not that strange for an uncompressed > dump to be larger than the database size, plain SQL > dumps are much less space efficient than a DBMS can > be when it stores the data on disk. But of course, there > also indices to consider. > > Have you tried pg_dump -Fc? > >> I am performing a monthly vacuum full on the database and a nightly > vacuum >> all > > That should only impact the pg_database_size.