[OSM-dev] Update osm2pgsql patch mode
Martijn van Oosterhout
kleptog at gmail.com
Mon Sep 1 08:57:12 BST 2008
On Mon, Sep 1, 2008 at 1:57 AM, Robert (Jamie) Munro <rjmunro at arjam.net> wrote:
>> FWIW, that's exactly what osmosis does. It treats create and modify
>> identically when applying changes. I go to a fair bit of trouble when
>> creating a changeset file to get the create versus modify correct
>> (including cases where an entity is deleted and re-created) but it all
>> falls over when applying changes onto a planet file where you have to
>> overlap a time period to get a consistent snapshot.
>
> In theory, you only need to do this once on a planet file. After that,
> everything should be consistent and remain consistent, and it's probably
> worth putting the checks back in, because a subsequent error would imply
> a deeper problem with either the diffs or with the merge routine.
It's also bad performance-wise because for osm2pgsql deleting
something requires anywhere from 3 to 7 queries to delete stuff from
various places.
I've been thinking of making a mode --safe which will make it ignore
errors, which will be needed the first patch only. And have JOSM
format (planet dump) defaults to off and for osmChange it's on. And a
lot of the time is taken by building indexes, and the whole clustering
bit which I'm currently doubtful whether it really helps.
In any case, the patch applying is fast enough as it is once its going
so maybe I'll make the modify-instead-of-add the default for the time
being until a better implementation comes along.
Have a nice day,
--
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
More information about the dev
mailing list