I was importing a planet dump to pgsql with the --write-apidb-0.6 and got the error:<div><br></div><div><div>ERROR: insert or update on table "current_way_nodes" violates foreign key constraint "current_way_nodes_node_id_fkey"</div>
<div>  Detail: Key (node_id)=(395051992) is not present in table "current_nodes".</div><div><br></div><div>Why would that cause osmosis to fail? 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)?</div>
<div><br></div><div>Thanks for any help -</div><div>Jeff</div><div><br></div><div><br></div><div>==================Full error:=====================</div><div><br></div><div><br></div><div><div>motel:bin eco$ cd ../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="osm-planet" user="eco" password="poopies" validateSchemaVersion=no</div>
<div>May 26, 2009 8:59:51 PM org.openstreetmap.osmosis.core.Osmosis run</div><div>INFO: Osmosis Version 0.31</div><div>May 26, 2009 8:59:51 PM org.openstreetmap.osmosis.core.Osmosis run</div><div>INFO: Preparing pipeline.</div>
<div>May 26, 2009 8:59:51 PM org.openstreetmap.osmosis.core.Osmosis run</div><div>INFO: Launching pipeline execution.</div><div>May 26, 2009 8:59:51 PM org.openstreetmap.osmosis.core.Osmosis run</div><div>INFO: Pipeline executing, waiting for completion.</div>
<div>Jun 1, 2009 6:50:20 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion</div><div>SEVERE: Thread for task 1-read-xml-0.6 failed</div><div>org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to load current way nodes.</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.openstreetmap.osmosis.core.apidb.v0_6.ApidbWriter.complete(ApidbWriter.java:980)</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.openstreetmap.osmosis.core.xml.v0_6.XmlReader.run(XmlReader.java:110)</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>at java.lang.Thread.run(Thread.java:637)</div><div>Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "current_way_nodes" violates foreign key constraint "current_way_nodes_node_id_fkey"</div>
<div>  Detail: Key (node_id)=(395051992) is not present in table "current_nodes".</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:343)</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.openstreetmap.osmosis.core.apidb.v0_6.ApidbWriter.complete(ApidbWriter.java:977)</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>... 2 more</div><div>Jun 1, 2009 6:50:20 PM org.openstreetmap.osmosis.core.Osmosis main</div><div>SEVERE: Execution aborted.</div><div>org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:85)</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)</div><div><br></div></div></div>