[OSM-dev] Osmosis error, duplicate
Joachim Zobel
jz-2008 at heute-morgen.de
Tue Jun 2 21:39:26 BST 2009
Am Dienstag, den 02.06.2009, 11:52 -0700 schrieb Jeffrey Warren:
> I was importing a planet dump to pgsql with the --write-apidb-0.6 and
> got the error:
>
> ERROR: insert or update on table "current_way_nodes" violates foreign
> key constraint "current_way_nodes_node_id_fkey" Detail: Key
> (node_id)=(395051992) is not present in table "current_nodes".
>
> Why would that cause osmosis to fail?
Not shure. Osmosis should work with foreign keys, so this may be a bug.
I would however recommend loading the data into a database without any
indexes or foreign keys and then recreate them.
See
http://gis.hsr.ch/wiki/HowTo_OpenStreetMap#Howto_mit_PostgreSQL
This is much faster for that size. The reason is that INSERTing
otherwise writes the data _and_ the indexes. This causes the heads to
move back and forth (unless you have seperate disks for the data and all
its indexes), which means a major slowdown.
> I seem to be left with only 42448 current_ways, and no
> current_relations or current_relation_tags. Can I restart osmosis
> without re-running the entire import (5 days)?
Sorry, probably you can't.
Sincerely,
Joachim
More information about the dev
mailing list