[OSM-dev] Update osm2pgsql patch mode

Robert (Jamie) Munro rjmunro at arjam.net
Mon Sep 1 00:57:38 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brett Henderson wrote:
> On Mon, Sep 1, 2008 at 6:50 AM, Martijn van Oosterhout
> <kleptog at gmail.com <mailto:kleptog at gmail.com>> wrote:
> 
>     Umm, yeah. There's that. The way I solved it was with the patch below,
>     which is a gross hack but it works. Basically it turns every create
>     into a modify so it deletes any conflicting rows before inserting. It
>     may be the only way, but I'm still thinking on it...
> 
> 
> 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.

Robert (Jamie) Munro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAki7L+YACgkQz+aYVHdncI1bjgCfdF40andOJIztfe6au5cJRNvZ
yEoAoKy9w0nXx0vP+8lhUyIqdSDuzWdd
=edmM
-----END PGP SIGNATURE-----




More information about the dev mailing list