[OSM-dev] osm2pgsql Error way_changed_mark

Andrew Ayre andy at britishideas.com
Fri Sep 18 18:54:12 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

I'll give that a try. It makes sense because I was using JOSM to 
download data. I then edited it and uploaded changes to the server. Next 
I saved a local copy to import into my db.

thanks, Andy

PGP Key ID: 0xDC1B5864

More information about the dev mailing list