[OSM-dev] [Maposmatic-dev] Re: Growth of on-disk size of OSM database

Thomas Petazzoni thomas.petazzoni at enix.org
Wed Jul 14 11:56:22 BST 2010


Hello,

Thanks Frederik for your quick feedback!

On Wed, 14 Jul 2010 12:26:57 +0200
Frederik Ramm <frederik at remote.org> wrote:

> Depends on what you define as "same result". If you make a full dump
> of your PostgreSQL tables and then re-import that, you will be
> somewhere at 122 GB or so. You could also do a "vacuum full" to
> achieve the same result, or do a fresh import. But if you make a
> comparison of the files in your /var/lib/postgresql directory, these
> will not be the same as if you were to do a new import. The normal
> vacuuming that PostgreSQL does is insufficient to release some
> allocated space and later freed space in the data files, that's why
> your database is larger that it would have to be. Your select results
> will look the same.

Yes, we understand that when we access the database, the results are
the same, so from an user perspective, it makes no difference between
having a fresh full import, or an old import that has been kept
up-to-date using daily diffs.

However, from a system administration point of view, having the
database grow much faster than it really does (after 10 months, the
database is 43% larger than it "really" is) is a little bit problematic.

I suppose that similar things will happen with the minutely diffs, no ?
Would working with minutely diffs make this any better or worse ?

Unfortunately, as far as I understand, doing a "vacuum full" is going
to block accesses to the database for a fairly long amount of time
(days ?). So the best solution is probably to regularly (every few
months) do a new full import in a separate database, and switch to this
new database when the full import is completed.

Thanks,

Thomas
-- 
Thomas Petazzoni                         http://thomas.enix.org
MapOSMatic				 http://www.maposmatic.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100714/9c2cba39/attachment.pgp>


More information about the dev mailing list