[OSM-dev] osm2pgsql Error way_changed_mark

Andrew Ayre andy at britishideas.com
Sat Sep 19 00:22:34 BST 2009

Jon Burgess wrote:
> On Thu, 2009-09-17 at 23:01 -0700, Andrew Ayre wrote:
>> Previously I was using 0.52 and it was working fine. However it wasn't 
>> include the service tag, so now I am using 0.67-17674M. When I run it with:
>> osm2pgsql -d mapnik -p opt -U username -W -c -m -s opt.osm
>> I get:
>> Processing: Node(10k) Way(0k) Relation(0k)way_changed_mark failed: 
>> ERROR:  prepared statement "way_changed_mark" does not exist
>> (7)
>> Arguments were: 16908947,
>> Error occurred, cleaning up
>> I am using PostgreSQL/PostGIS 8.3 on Debian Lenny.
>> Any ideas on what I can do to fix this?
> I have seen the error before. If I remember correctly, it happens when
> you load an osm file which contains elements marked for modification
> (either in a <modify> or action='modify'). This works fine in --append
> mode, but causes the error you describe when not run as an append.
> I think you can fix it by creating a DB with empty tables and then
> loading your data using --append:
> $ echo "<osm></osm>" > empty.osm
> $ osm2pgsql -d mapnik -p opt -U username -W -c -m -s empty.osm
> $ osm2pgsql --append -d mapnik -p opt -U username -W -c -m -s opt.osm

Hi Jon,

It is related to making local edits on the data before importing it into 
the db. Unfortuantely adding an empty data set then appending doesn't 
work around it.

Perhaps you could add a command line flag to ignore action='modify'? 
Meanwhile I will try to write a pre-processor to remove them before 
using osm2pgsql.

thanks, Andy

PGP Key ID: 0xDC1B5864

More information about the dev mailing list