[OSM-dev] Osmosis error, duplicate

Jeffrey Warren warren at mit.edu
Fri Jun 5 17:40:49 BST 2009


I've been importing with:
motel:osmosis-0.31 eco$ bin/osmosis --read-xml-0.6
file="/Volumes/Planet/planet.osm" --write-apidb-0.6
populateCurrentTables=yes host="localhost" database="****" user="****"
password="****" validateSchemaVersion=no

and it's been running the following query for about 24 hours:

SELECT Count(*) AS changesetCount FROM changesets WHERE id=$1

I don't remember this occurring in previous import attempts. Has it stalled,
and should I cancel and try again?

(As mentioned above I'd like to skip changesets if they're going to add a
lot of time to the import.  Also I couldn't find documentation for skipping
changesets; maybe I should just remove that table and it'll figure it out?)

I've been using the first half of the apidb06-latest schema, following
directions here:

http://gis.hsr.ch/wiki/HowTo_OpenStreetMap#Howto_mit_PostgreSQL

Jeff


On Tue, Jun 2, 2009 at 4:36 PM, Joachim Zobel <jzobel at heute-morgen.de>wrote:

> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090605/24281624/attachment.html>


More information about the dev mailing list