This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

can we use a single postrges DB to serve several OSM services?

0

Hi All,

First post here. I would like to start by thanking the fantastic OSM community. I started getting interested in GIS relatively recently, and I must say that I have a lot of fun doing geospatial analysis so far. This is mostly permitted thanks to your awesome work!

Please be forgiving if my question is a bit naive, but I would love to hear your thoughts on the following. I am working on a project that relies extensively on various geospatial services, I am therefore considering setting up my own instance of OSM with the following services

  • geocoding and reverse geocoding
  • POIs retrieval
  • routing

I am able to find docker images for each service, which is great, but as far as I understood, each service is independent of the others. For example, if I want to set up those services for Luxembourg, I would need to do three different data ingestions into three different containers running each their own database.

What I would ideally like to achieve is to have a single Postgres DB that can be used by each service. I did a bit of googling but, to my surprise, this didn't seem to be a very common use-case. So now I am wondering if this is actually doable? If yes, any pointers to the relevant resources will be highly appreciated :)

asked 30 Nov '20, 17:14

fatgere's gravatar image

fatgere
11112
accept rate: 0%


One Answer:

0

No. There is some work related to a single database for geocoding and rendering that could help, but most routing engines don't use a general purpose database but instead run something specialized.

Where a general purpose database like PostgreSQL is used there are a wide assortment of schemas to put the data into, and

answered 30 Nov '20, 18:04

pnorman's gravatar image

pnorman
2.4k52140
accept rate: 18%

Thanks @pnorman for your reply. Really helpful to know that this is actually not possible. I think your reply got cut at some points, would be interested to read the last part though :)

(30 Nov '20, 19:21) fatgere

Source code available on GitHub .