From: Bill Moran <wmoran@collaborativefusion.com>
To: Adrian Moisey <adrian@careerjunction.co.za>
Cc: pgsql-performance@postgresql.org
Subject: Re: db size
Date: Mon, 14 Apr 2008 09:12:12 -0400
Message-ID: <20080414091212.f73eb101.wmoran@collaborativefusion.com> (raw)
In-Reply-To: <4802F9E4.3000704@careerjunction.co.za>
References: <4802F9E4.3000704@careerjunction.co.za>
In response to Adrian Moisey <adrian@careerjunction.co.za>:
>
> We currently have a 16CPU 32GB box running postgres 8.2.
>
> When I do a pg_dump with the following parameters "/usr/bin/pg_dump -E
> UTF8 -F c -b" I get a file of 14GB in size.
>
> But the database is 110GB in size on the disk. Why the big difference
> in size? Does this have anything to do with performance?
In a dump, indexes are a single command. In the actual database, the
indexes actually contain all the data the indexes require, which can
be substantially more in size than the command to create the index.
Additionally, a running database has a certain amount of wasted space.
If you're running vacuum on a proper schedule, this won't get out of
hand. Read this page to understand better:
http://www.postgresql.org/docs/8.1/static/maintenance.html
And lastly, I expect that the pg_dump format is able to do more aggressive
compression than the running database.
--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/
wmoran@collaborativefusion.com
Phone: 412-422-3463x4023
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: wmoran@collaborativefusion.com, adrian@careerjunction.co.za
Subject: Re: db size
In-Reply-To: <20080414091212.f73eb101.wmoran@collaborativefusion.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox