Opened 6 years ago

Closed 3 years ago

#4788 closed defect (duplicate)

The append option does not allow duplicate data

Reported by: AMB Owned by: jburgess777@…
Priority: major Milestone:
Component: osm2pgsql Version:
Keywords: Cc:

Description

When using the --append option if there are the same nodes in the existing data as the appended data then inserting the data into the database fails with an error like this:

Processing: Node(6132k 77.6k/s) Way(466k 1.97k/s) Relation(0 0.00/s)COPY_END for COPY planet_osm_ways FROM STDIN;
 failed: ERROR:  duplicate key value violates unique constraint "planet_osm_ways_pkey"
CONTEXT:  COPY planet_osm_ways, line 5663: "4642313     {29533733,29533734,29533735,29533736,29533737,29533738,29533739,29533740,29533741,29533742,2..."

This was discussed before, a year ago, on the mailing list, but since I had a patch that worked for me I didn't follow up with a bug report here:

http://lists.openstreetmap.org/pipermail/dev/2011-December/023940.html

Now that I have upgraded to the latest (SVN) version to get 64-bit IDs the problem is still present.

Change History (1)

comment:1 Changed 3 years ago by pnorman

Resolution: duplicate
Status: newclosed

--append is designed for adding a diff, not for importing two files. See https://github.com/openstreetmap/osm2pgsql/issues/213 for details.

Note: See TracTickets for help on using tickets.