[Tile-serving] [openstreetmap/osm2pgsql] Add a post-processing option for the update script (#1423)
Sarah Hoffmann
notifications at github.com
Tue Feb 23 21:11:33 UTC 2021
With the `--diff-file` option, it's an unlink-if-file-exists before starting the download and then opening a completely new file. That's all it does with the file. You can overwrite or move it or do anything with the diff file in the post-processing script. The updater won't care. So I believe that the hard-linking should be fine, too.
The one thing to be careful about is failures in the post-processing script. Right now, the updater considers the entire diff application a failure when the post-processing script returns with a non-zero exit code. It will exit with non-zero itself and when started the next time, it downloads the diffs again and reapplies them to the database. I'm not entirely sure if that is a good idea or not but it ensures that the post-processing script sees the data again when it fails.
> It also occurs to me that the other thing we use the files for at the moment is to track the last update time for munin/prometheus monitoring - not sure what the best replacement for that would be?
You can simply get the date from the database: `SELECT importdate FROM planet_osm_replication_status`
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1423#issuecomment-784515467
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210223/ab498e79/attachment.htm>
More information about the Tile-serving
mailing list