-
Hey Threre, maybe someone can help me out. I don't want to open an issue for that, so: Why is it necessary to create a datebase by default during the import task of nominatim? I'm asking because i'm working in a company that has strict rules for database-user and the pgsql is running in a huge cluster of customized pgsql-instances. So I've got an empty database with a db-owner with full rights inside the database and a second read-only user. Our goal is to deploy a own OSM/Nominatim-Instance for internal usage, so that we don't need to call from LAN to WAN. First thing we have done, was to build and ship the nominatim.so library and it's requirements inside of our pgsql-cluster images. As second step i tried with the latest-Version of Nominatim (3.7.1) to import a small region and got - as i expected - an error from "createdb". I took a look around the issues and discussions here and found this: #423 (comment) This comment seems to be for the older versions of Nominatim, so is there a way to do an import without creating a new database? Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
If I understand right you're saying a suitable database with database user and access rights already exists, but the user executing the import scripts cannot create a new database, either because of permissions, policy, missing file or convience. You're right, with Starting Nominatim 3.7 the Essentially a feature request to be able to skip it again. One work-around is editing the logic locally ( |
Beta Was this translation helpful? Give feedback.
-
Non-superuser imports were never really officially supported because the database creation may not be the only step that requires special database rights. 3.7.x still has the old util functions, so the hack described in #423 should still work. No guarantees. You basically have to follow the installation instructions from 3.6. and run Nominatim from the build directory. The 4.0 version of Nominatim will get rid of the database module which is probably the biggest obstacle with non-superuser imports. I think its time to revisit the work flow then and see if we can have an official non-privileged import mode. |
Beta Was this translation helpful? Give feedback.
If I understand right you're saying a suitable database with database user and access rights already exists, but the user executing the import scripts cannot create a new database, either because of permissions, policy, missing file or convience.
You're right, with
setup.php
in earlier Nominatim versions skipping was possible. Or rather the setup with-all
executed 10 steps and specificying 9 step instead made it possible to skip the first step.Starting Nominatim 3.7 the
setup.php
got replaced by anominatim
command-line interface (https://nominatim.org/2021/02/25/nominatim-tool.html) and almost all code rewritten in python. By reading the code it looks like thecreatedb
step can't curre…