Skip to content

How does osm2pgsql --append handles duplicates while updating diff files #1974

Answered by lonvia
wgds60 asked this question in Q&A
Discussion options

You must be logged in to vote

osm2pgsql will fail if (and only if) the same OSM object appears twice in the same input file. Otherwise in append mode the data in the database will be updated to whatever is in the file. If the data in the file is older than what is in the database, you do a 'rollback', i.e. you set the database to an older version. At this point there is no guarantee that the data is coherent up until you have reapplied all diffs up to the date where your database was before. This can be really useful, when something bad happened during updates. You can use the append mode to do a replay of updates. It is also useful after the initial import to make sure the data is properly in sync between your initia…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@wgds60
Comment options

@pnorman
Comment options

Answer selected by wgds60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants