<div class="gmail_quote">On Wed, Mar 3, 2010 at 8:32 PM, Ævar Arnfjörð Bjarmason <span dir="ltr"><<a href="mailto:avarab@gmail.com">avarab@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Mar 3, 2010 at 01:21, Brett Henderson <<a href="mailto:brett@bretth.com">brett@bretth.com</a>> wrote:<br>
> Hi Ævar,<br>
><br>
> Can you provide the full error output from Osmosis. I suspect there's a<br>
> "caused by" nested exception that provides the root cause for the error.<br>
<br>
</div>After some more debugging it turns out that the issue is simply that<br>
the script/*.sql files are very out of date and in no way reflect the<br>
current DB schema or the tables that osmosis tries to insert into.<br></blockquote><div><br>Um, I think you may be using the wrong tasks against the wrong schema. It sounds like you're trying to use "apidb" tasks against the Osmosis simple schema.<br>
<br>The "pgsql" tasks are the ones required for the Osmosis "simple" schema that you've created. This schema doesn't have a concept of history tables so in fact every table is a current table. It is a PostGIS schema with optional linestring and bbox columns on the way table.<br>
<a href="http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage#PostGIS_Tasks">http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage#PostGIS_Tasks</a><br><br>The "apidb" tasks are the ones that write to the production rails API schema. There is a script called "script/contrib/apidb_0.6.sql" included with Osmosis to create it. It is somewhat out of date because I don't have a working rails port, but should still be compatible if you switch on the allowIncorrectSchemaVersion=yes on all database tasks.<br>
<a href="http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage#API_Database_Tasks">http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage#API_Database_Tasks</a><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
In the attached patch I fixed some of these but it doesn't fix all the<br>
issues, the current_* tables are still missing. It would be nice if<br>
one could skip importing into current_* for one-off imports like<br>
these.<br></blockquote><div><br>I had a quick look and it appears that you're adding APIDB tables to the "simple" schema.<br><br>As for current_* tables, the "apidb" tasks do have a populateCurrentTables=no option, but I don't think this is what you're looking for.<br>
<a href="http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage#--write-apidb_.28--wd.29">http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage#--write-apidb_.28--wd.29</a><br><br>Unless you really need apidb tasks, I'd stick with pgsql tasks because the associated schema is much simpler.<br>
<br></div></div>Brett<br><br>