[Tile-serving] [openstreetmap/osm2pgsql] How does osm2pgsql --append handles duplicates while updating diff files (Discussion #1974)
Sarah Hoffmann
notifications at github.com
Tue Jun 13 08:16:48 UTC 2023
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 initial import source and your source of replication diffs.
If you use `append` mode to add more extracts to an existing database, it is your responsibility to make sure that the data in the database and the additional extract are exactly from the same date. Otherwise, again, there is no guarantee that the data is coherent.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/1974#discussioncomment-6160808
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/repo-discussions/1974/comments/6160808 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230613/a455a121/attachment.htm>
More information about the Tile-serving
mailing list