headway icon indicating copy to clipboard operation
headway copied to clipboard

Allow extracting the PostgreSQL database from the Nominatim stack

Open asitemade4u opened this issue 1 year ago • 6 comments

In the same vein as my previous #82 post, I think you should "make visible" the PostgreSQL database installed by the Nominatim stack. That would allow users to rely on their own database (in our case, one that is installed on another server) instead of deploying a database local to Headway. That would also allow a better use of already existing resources, such as database backups, replication, etc.

asitemade4u avatar Aug 12 '22 15:08 asitemade4u

@3nprob seemed interested in doing this. Please do note though that nominatim databases require custom tuning for best performance (not currently done in headway), and a postgis extension to be installed.

ellenhp avatar Aug 12 '22 15:08 ellenhp

I should also mention that I don't want to start on this work until #81 or some successor to it is merged. Our current makefile system is kind of brittle in ways I didn't even realize until I used earthly.

ellenhp avatar Aug 12 '22 16:08 ellenhp

Yeah, well, tuning is for huge databases, not so much so for city stacks. It will be enough to have a Postgres+Postgis docker container (which we currently have here).

asitemade4u avatar Aug 12 '22 19:08 asitemade4u

As per the makefile being brittle, yes, that is also my impression: even with a powerful server, we faced interruptions on big city installs (Paris or NYC) and had to relaunch the make a couple times.

asitemade4u avatar Aug 12 '22 19:08 asitemade4u

Yeah, well, tuning is for huge databases, not so much so for city stacks. It will be enough to have a Postgres+Postgis docker container (which we currently have here).

Definitely. That's why I haven't really gotten around to it.

As per the makefile being brittle, yes, that is also my impression: even with a powerful server, we faced interruptions on big city installs (Paris or NYC) and had to relaunch the make a couple times.

Yeah, it's kind of a bummer. I'm really hoping Earthly helps things out there!

ellenhp avatar Aug 12 '22 19:08 ellenhp

Just as a heads-up, #88 would remove postgres entirely. There's still the question of how to separate out the elasticsearch cluster though, because all of the same arguments in https://github.com/headwaymaps/headway/issues/83#issue-1337322226 still apply.

ellenhp avatar Aug 15 '22 16:08 ellenhp

I think I'm going to close this. Headway doesn't use postgres anymore but if anyone wants to try and extract the ES cluster from the pelias stack I'm all ears. :)

ellenhp avatar Aug 27 '22 21:08 ellenhp