[OSM-dev] Postgres 8.4/PostGIS 1.4 performance
Martijn van Oosterhout
kleptog at gmail.com
Sun Sep 20 11:04:34 BST 2009
On Sat, Sep 19, 2009 at 7:42 PM, Jochen Topf <jochen at remote.org> wrote:
>> (I beleive it used to vacuum, but I don't immediately see it in the
>> current source).
> I always disabled autovacuum for this kind of database. It tends to always
> come at the wrong time. Its better to do the vacuum once after an import
> run and never in between. Autovacuum is nice for a database where many
> different programs change data all the time. For a OSM Mapnik database where
> there is exactly one program changing data, it should do the vacuum itself.
I remember now. I removed the vacuum when I added support for the
applying of diffs. Quite simply:
1. Doing a vacuum immediately after the import isn't useful, there is
nothing to vacuum by definition.
2. Doing a vacuum after a diff is also useless, since the vacuum will
probably takes much much longer than applying the diff. (This I noted
when appliyng an empty diff took minutes on my machine). If you leave
it in you won't be able to apply diffs fast enough.
What you want is the vacuum to apply say once every few days or so,
which is about what autovacuum will do. What I do do is push it more
in the background so it can't take more than 10MB/s of disk bandwidth.
Given the size of the tables, you can imagine how long it takes, but
that doesn't really matter.
Have a nice day,
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
More information about the dev