Opened 5 years ago

Closed 21 months ago

#3234 closed defect (fixed)

osm2pgsql: insert_rel failed: ERROR: value "69304" is out of range for type smallint

Reported by: medi@… Owned by: jburgess777@…
Priority: minor Milestone:
Component: osm2pgsql Version:
Keywords: osm2pgsql insert_rel smallint rel_off Cc:

Description

hi,

afer a large mass import from the history data have i follow limit

insert_rel failed: ERROR: value "69304" is out of range for type smallint
at daten/2009/1111-1112.osc.gz

error msg:
insert_rel failed: ERROR: value "69304" is out of range for type smallint
(7)
Arguments were: 7432, 0, 69304, {38163187,38163191,....
{"type","boundary","ref","44","name","Loire-Atlantique","converted_by","Editop_2_OSM_v0016","boundary","administrative","admin_level","6"},
Error occurred, cleaning up

problem is the smallint from planet_osm_rels.rel_off and the shema in middle-pgsql.c
i add as atachment a smal diff for fixing the limit

ps: please add a auto change typ for existing tables ;)

Attachments (1)

rel_off_smalint_limit.diff (1.3 KB) - added by medi@… 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by medi@…

comment:1 Changed 5 years ago by TomH

  • Owner changed from tom@… to jburgess777@…
  • Priority changed from major to minor
  • Status changed from new to assigned

comment:2 Changed 5 years ago by jburgess777@…

At the moment that particular relation has the following set:

gis=# select id,way_off,rel_off from planet_osm_rels where id=7432;
  id  | way_off | rel_off 
------+---------+---------
 7432 |       0 |     190

I think that particular version you are referring to was quickly reverted or cleaned up. The change should only be needed it a relation has more than 65536 members. I don't think any of the current data needs this.

I'm a little reluctant to add this at the moment, especially because it needs a tweak of the DB schema. I guess you can work with your own patched version at the moment. In the short term, I might be more interested in adding a sanity check which rejects this data.

comment:3 Changed 4 years ago by TomH

  • Component changed from utils to osm2pgsql

comment:4 Changed 21 months ago by amm

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.