[OSM-dev] Growth of on-disk size of OSM database
Frederik Ramm
frederik at remote.org
Wed Jul 14 11:26:57 BST 2010
Hi,
Thomas Petazzoni wrote:
> We've done an initial import of this database in ~october 2009, and
> since then, we've used daily diffs to keep this database up to date. As
> of today, our PostgreSQL database takes 174 GB. However, during a
> discussion at SOTM, Frederik told us that the size of the world
> database resulting from a brand-new import would only be 120-130 GB.
> This seems to mean that using the daily diffs does not produce the same
> result as making a full import of the database. Is this true ?
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.
Bye
Frederik
More information about the dev
mailing list