<div class="gmail_quote">On 27 December 2011 08:10, Oon Arfiandwi <span dir="ltr"><<a href="mailto:robot@ijo.me">robot@ijo.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi brett,<br>
<div class="im"><br>
On Wed, Dec 21, 2011 at 5:04 AM, Brett Henderson <<a href="mailto:brett@bretth.com">brett@bretth.com</a>> wrote:<br>
> On 20 December 2011 03:14, Oon Arfiandwi <<a href="mailto:robot@ijo.me">robot@ijo.me</a>> wrote:<br>
>><br>
</div><div class="im">>> I just try to apply osmosis command below,<br>
>> the problem is: "Caused by: org.postgresql.util.PSQLException: ERROR:<br>
>> relation "schema_migrations" does not exist"<br>
>><br>
>> I read a solution about schema_migrations relation here:<br>
>> <a href="http://forum.openstreetmap.org/viewtopic.php?id=7396" target="_blank">http://forum.openstreetmap.org/viewtopic.php?id=7396</a><br>
>><br>
>> then I change the command to:<br>
>> osmosis --read-xml-change file="asiadiff.osc" --write-pgsql-change<br>
>> database="gis" user="osm" password="x" host="localhost"<br>
>> or<br>
>> osmosis --read-xml-change file="asiadiff.osc" --write-pgsimp-change<br>
>> database="gis" user="osm" password="x" host="localhost"<br>
>><br>
>> but still no luck,<br>
>> I got another exception: "org.postgresql.util.PSQLException: ERROR:<br>
>> relation "schema_info" does not exist"<br>
>><br>
>><br>
>> any other references?<br>
><br>
><br>
> How have you created your database?  Specifically, which scripts did you use<br>
> to create the database tables?  The OpenStreetMap project has a number of<br>
> different incompatible schemas using PostgreSQL PostGIS extensions all<br>
> optimised for different purposes.<br>
> <a href="http://wiki.openstreetmap.org/wiki/List_of_Database_Schemas" target="_blank">http://wiki.openstreetmap.org/wiki/List_of_Database_Schemas</a><br>
<br>
</div>I created database using osm2pgsql, here's the command:<br>
<br>
./osm2pgsql -S default.style --slim -d gis -C 1024<br>
--number-processes=1 --cache-strategy=dense asia.osm.bz2<br>
<br>
how can I update the database which previously created by osm2pgsql?<br>
any reference?<br></blockquote><div><br>Perhaps this page will be of some use:<br><a href="http://wiki.openstreetmap.org/wiki/Minutely_Mapnik#Import_Replication_Data">http://wiki.openstreetmap.org/wiki/Minutely_Mapnik#Import_Replication_Data</a><br>
<br>In summary, you can use Osmosis to download and merge the replication files, but you need to use osm2pgsql to apply them.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im"><br>
<br>
><br>
> If you wish to use the pgsql tasks in Osmosis you will need to use the<br>
> pgsnapshot_*.sql scripts from the scripts directory of the Osmosis<br>
> distribution.  More details are available here:<br>
> <a href="http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#PostGIS_Tasks_.28Snapshot_Schema.29" target="_blank">http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#PostGIS_Tasks_.28Snapshot_Schema.29</a><br>

><br>
<br>
</div>or should I drop the existing database,<br>
and setup the new one by following<br>
<a href="http://wiki.openstreetmap.org/wiki/Osmosis_PostGIS_Setup" target="_blank">http://wiki.openstreetmap.org/wiki/Osmosis_PostGIS_Setup</a> ?<br>
so next time I can update my database using Osmosis?<br></blockquote><div><br>That depends on what you're using the database for (apologies if you've already mentioned it).  The osm2pgsql schema stores a subset of the OSM data in a schema suitable for rendering, the Osmosis pgsnapshot provides a complete snapshot of the OSM dataset in a generic schema that isn't suitable for rendering.<br>
</div></div><br>Brett<br><br>