Opened 11 years ago

Closed 11 years ago

#1495 closed defect (invalid)

Duplicate ways crash osm2psql in --slim mode

Reported by: Nop Owned by: Tom Hughes
Priority: major Milestone:
Component: utils Version:
Keywords: Cc:

Description

When you import several data files with osm2pqsql consecutively and any of them contain ways with identical ids, osm2pqsql fails with the error message:

failed: ERROR: duplicate key violates unique constraint "planet_osm_ways_pkey"

In non-slim mode, the same operation succeeds.

Use case: When you cut multiple sections OSM with osmosis for processing but eventually want everything in the same DB for rendering. Osmosis will duplicate all ways crossing the boundaries. Same problem occurs when you try to load neighboring plaent files, e.g. two neighboring states.

Change History (1)

comment:1 Changed 11 years ago by Tom Hughes

Resolution: invalid
Status: newclosed

I think you're misunderstanding what append mode is for in osm2pgsql - it is intended for loading updates to an area, not for adding extra areas. There is no support at present for loading multiple (possibly overlapping) areas like this.

Note: See TracTickets for help on using tickets.