[Tile-serving] [openstreetmap/osm2pgsql] Drop slim mode tables just after finishing processing pending ways an… (#612)

Sarah Hoffmann notifications at github.com
Fri Jan 12 08:12:36 UTC 2018


lonvia commented on this pull request.

I was about to say that the changes look good but see that you have started on splitting stop() now. We can chat on OFTC #osm-dev if you want.

> @@ -1072,7 +1072,10 @@ void middle_pgsql_t::pgsql_stop_one(table_desc *table)
 void middle_pgsql_t::stop(void)
 {
     cache.reset();
-    if (out_options->flat_node_cache_enabled) persistent_cache.reset();
+    if (out_options->flat_node_cache_enabled) {
+        persistent_cache->clean_up();
+        persistent_cache.reset();
+    }

In all modes a cache of node locations is kept in memory (the -C parameter). Currently it is kept around in the indexing phase, making the memory unavailable for postgres. But I think you are right, just splitting as I suggested again leaves the drop case in a worse state. This clearly needs some more thinking. So I would suggest to leave it for this PR and tackle the cache dropping later.

-- 
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/612#pullrequestreview-88401938
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20180112/666ccb51/attachment.html>


More information about the Tile-serving mailing list