Re: why is pg_dump so much smaller than my database? - Mailing list pgsql-general

From Alban Hertroys
Subject Re: why is pg_dump so much smaller than my database?
Date
Msg-id CAF-3MvNmd-zoGSxqRLYbHLfT8U23kq8N+K_ib-dyZpCcpNccZA@mail.gmail.com
Whole thread Raw
In response to Re: why is pg_dump so much smaller than my database?  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
On 29 March 2012 09:11, John R Pierce <pierce@hogranch.com> wrote:
> On 03/28/12 10:32 PM, Carson Gross wrote:
>>
>> I've got a pretty big database (~30 gigs) and when I do a pg_dump, it ends
>> up only being 2 gigs.

I suppose you're talking about a plain text dump here? A compressed
dump would likely[*] be quite a bit smaller than your database.

And as John already says, deleted tuples do not get dumped, neither do
index contents. Any fill-factors defined on tables or indexes would
also account for a difference in size.

*: This does depend on what data you store, of course. A database that
mainly consists of stored JPEG images, for example, wouldn't compress
much. A database with the same text data over and over would compress
immensely.
--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: why is pg_dump so much smaller than my database?
Next
From: "Albe Laurenz"
Date:
Subject: Re: system catalog privilege and create privilege ??? how to control them?? thanks