OpenStreetMap

Обновление локальной postgres базы OSM через osm2pgsq заработало, не прошло и двух месяцев.

osm2pgsql-replication update -v -d gis  --max-diff-size 100 --  -G --hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 0 --flat-nodes ~/data/nodes.bin --number-processes 8 -S ~/src/openstreetmap-carto/openstreetmap-carto.style

Самое обидное, что не понятно, что конкретно изменилось. Если придется переустановить убунту, а похоже придется, то всё снова может отвалиться.

Так чтобы там не писали на switch2osm, свой тайловый сервер – это побольшей части магия.

Discussion

Comment from SomeoneElse on 31 January 2024 at 15:08

So no matter what they write on switch2osm, your own tile server is mostly magic.

:)

Pull requests welcome - or even an issue describing what did or did not work (including versions etc ).

I tend to test the “vanilla replication” version about once per new OS, but the pyosmium version more often since I use it myself.

Comment from Zkir on 2 February 2024 at 23:12

Andy, so you are the author of those switch2osm articles? ) It’s not that clear from the site.

Pull requests welcome

Well, this is not about some particular small fixes. The whole process is too complex and way too complex for a newbie Linux user. As a such, I would prefer something like:

sudo apt install osm-tile-server
osm-tile-server --autoconfigure
osm-tile-server --enjoy

I guess it’s not possible (yet?) for many reasons :(

Also I’ve found out that the performance and even success of this whole thing heavily depends on the postgres configuration, and there are very little materials out there on this subject.

For example, after installation according to the manual, replication for small osm exports worked perfectly for small extracts, but on the whole planet it just froze completely. I’ve altered something in postgres conf, and it works now perfectly, but when I have to reinstall it, I will have to solve that puzzle again.

Also, I am still not able to get expected performance for the initial postgres import 14 hours against expected 7.5 and I am still not sure, whether the reason is different hardware or configuration of something. It’s not a big problem right now, but anyway.

Comment from SomeoneElse on 3 February 2024 at 12:37

With regard to “ease of setup”, the docker guide is probably the closest to a “create a server in one command” that we have. The “sudo apt install” at the top of “manual” instructions actually does almost all of the work for setting things up, but the “extras” such as replication (which there are at least 3 different ways to do, and at least three different sets of servers to do it with).

More information about postgres tuning for larger databases is definitely something that would be useful - earlier versions of the switch2osm guide and the precursors to it did have that but it’s not been something I’ve had a chance to test recently.

Log in to leave a comment