Rework update mechanism to be independent from Nominatim updates #772
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This completely changes how updates are handled with relation to Nominatim updates. Photon now installs a trigger which tracks updates by Nominatim in a private tables. When running updates, it simply collects new information for the changed items.
It wasn't possible to implement this completely without triggers (as originally discussed in #638) because there is no way to track deletions properly. I still didn't want to add the change mechanisms to Nominatim as it would require to wait for a new release of Nominatim. The proposed mechanism should work with any Nominatim version insofar as Photon is compatible with it.
Updates for interpolations and places with housenumbers are still broken. I'll address that in a separate PR.
Please note that the mechanism how to run Nominatim and Photon updates has changed completely. Refer to the README on how to set up the process now. It is in theory possible to run the Nominatim update script and Photon updater concurrently but I would advise against it. Better to run them one after the other as shown in
continuously_update_from_nominatim.sh
.Fixes #638.