Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Duplicate ways crash osm2psql in --slim mode #1495

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Duplicate ways crash osm2psql in --slim mode #1495

openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment

Comments

@openstreetmap-trac
Copy link

Reporter: Nop
[Submitted to the original trac issue database at 11.08pm, Tuesday, 13th January 2009]

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.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 11.37pm, Tuesday, 13th January 2009]

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant