Jochen Topf wrote: > On Sun, Nov 02, 2008 at 08:40:45PM +1100, Brett Henderson wrote: > >> Florian Lohoff wrote: >> >>> On Fri, Oct 31, 2008 at 11:17:16AM +0100, Florian Lohoff wrote: >>> >>> >>>> Hi, >>>> i just discovered that osmosis was not able to apply the hourly osc file >>>> starting 2008-10-29T20:00:00Z - It failed with: >>>> >>>> 2008-10-31 11:09:52 CET ERROR: smallint out of range >>>> 2008-10-31 11:09:52 CET STATEMENT: INSERT INTO way_nodes (way_id, >>>> node_id, sequence_id) VALUES ($1, $2, $3) >>>> >>>> Is there a way with >2^16 aka 65536 nodes? >>>> >>>> Or did someone manage to enter a completely broken sequence number? >>>> >>>> >>> Its 2^15 because it signed - and yes - somebody managed to get abovE: >>> >>> osm=> select max(sequence_id) from way_nodes; >>> max >>> ------- >>> 39767 >>> (1 row) >>> >>> osm=> select * from way_nodes where sequence_id = 39767; >>> way_id | node_id | sequence_id >>> ----------+-----------+------------- >>> 28098452 | 308532457 | 39767 >>> >>> I converted the smallint to int ... >>> >>> >> So, should update the schema script included with osmosis as well? It's >> easy enough for me to change, but will increase the size of the database >> somewhat. >> > > I think you'll have to do that until the server is changed to forbid > more than x nodes on ways. > > Is there a problem with changing the server code to count the nodes and > return an error if there are more than x nodes? I haven't looked at the > code but that sounds pretty easy to do. If the server doesn't allow new > ways with more than x nodes and we have fixed the existing ways manually > we should be done. > I've updated the 0.5 version of the pgsql schema. I've left the 0.6 version as a smallint for now.
_______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

