I successfully built a PostgreSQL server on an Ubuntu VM and populated it with the latest Geofabrik .osm.pbf complete dataset for Nepal. Now, I'd like to append to that dataset all of the historic edit data. I'd like to keep every version of every node, rel, and way, not just the latest, most up-to-date version.
My understanding is that
OSM2PGSQL removes deprecated data when it appends the new data from a diff. Is this correct? If so, how can I go about storing a full history of edits, and not just the most recent ones?
When I try building an initial database with a full-history file like those found here, I get a crash with a duplicate key error, both on macOS and on Ubuntu.
Processing: Node(2760k 32.1k/s) Way(0k 0.00k/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" DETAIL: Key (id)=(4748383) already exists. CONTEXT: COPY planet_osm_ways, line 2
Error occurred, cleaning up
I tried following the OSM-history tutorial found here, but the dependencies used are deprecated on the latest Ubuntu and 1) make it so you have to uninstall curl (!!) and 2) meant I would have to dig into some dependency stuff which is way about my pay grade in terms of my experience with Ubuntu.
To be clear, I just want to store the date stamp and author of every previous edit to any existing node, relation, or way. I don't care what the actual edit was, I don't need to see it on a map. I just want to know when it happened and who did it.