[Tile-serving] [openstreetmap/osm2pgsql] Fix deletion on update in gazetteer (#1008)
Sarah Hoffmann
notifications at github.com
Sat Nov 30 22:04:27 UTC 2019
Objects so far have been deleted directly from the main thread in gazetteer. This may lead to deadlock as the updates in the copy thread trigger SQL triggers which may touch an object currently being deleted.
Gazetteer objects are now deleted in the copy thread in a batch just like we do for all other tables. For this we need a different kind of deleter as the primary key is different for gazetteer's place table. For this, delete lists become first class objects and the copy manager becomes responsible for adding the right deleter to the copy buffer object.
Fixes #964.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/1008
-- Commit Summary --
* move object deletion into its own class
* make object deleter replacable in the copy manager
* introduce special object deleter for gazetteer
* gazetteer: simplify deletion of unused
-- File Changes --
A src/db-copy-mgr.hpp (350)
M src/db-copy.cpp (77)
M src/db-copy.hpp (353)
M src/gazetteer-style.cpp (48)
M src/gazetteer-style.hpp (56)
M src/middle-pgsql.cpp (6)
M src/middle-pgsql.hpp (4)
M src/output-gazetteer.cpp (83)
M src/output-gazetteer.hpp (17)
M src/table.cpp (2)
M src/table.hpp (4)
M tests/test-db-copy-mgr.cpp (14)
M tests/test-db-copy-thread.cpp (19)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/1008.patch
https://github.com/openstreetmap/osm2pgsql/pull/1008.diff
--
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/1008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20191130/58b208bf/attachment.html>
More information about the Tile-serving
mailing list