I want to upload planet-latest.osm on a PostgreSQL database via osm2pgsql but even if I've got no error for the creation of the table, the process stops acting near the 2Go and the error is (sorry it's french):

Reading in file: osm/planet-latest.osm Processing: Node(1873580k) Way(0k) Relation(0k)COPY_END for COPY planet_osm_nodes FROM STDIN; failed: ERREUR: la valeur d'une clé dupliquée rompt la contrainte unique « planet_osm_nodes_pkey » CONTEXT: COPY planet_osm_nodes, ligne 1758128898 : « 2147483647 688301347 -16699132 \N »

Error occurred, cleaning up

asked 08 Jul '13, 08:40

so4ne's gravatar image

accept rate: 0%

You have a version of osm2pgsql that only supports 32bit IDs (if you type "osm2pgsql" it will say something about "32bit ID space" in the first line of output, or even worse, nothing about ID space at all. You have to re-compile osm2pgsql or download a version compiled for 64bit IDs.

permanent link

answered 08 Jul '13, 10:18

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 24%

Thank you for your reply, do you know how to switch to 64bit on a Debian 6.0 Squeeze? I have the 0.69 version of osm2pgsql

(08 Jul '13, 12:03) so4ne

The osm2pgsql package of Debian 6.0 ("Squeeze") doesn't support 64bit IDs. This is because Squeeze is rather old (from early 2011). The current stable version of Debian (7.0 aka "Wheezy") supports 64bit IDs. But if you cannot upgrade to Wheezy you can still get a recent version from GitHub, see the osm2pgsql wiki page for more information.

(08 Jul '13, 12:21) scai ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Jul '13, 08:40

question was seen: 3,839 times

last updated: 08 Jul '13, 12:30

powered by OSQA