From: Sarah Hoffmann Date: Mon, 1 Jun 2020 20:13:33 +0000 (+0200) Subject: Merge pull request #1813 from lonvia/revert-concurrent-indexing X-Git-Tag: v3.5.0~3 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/d89000cc3de6ecdca64e87c05836f6d4cc25b7d1?hp=e09d4440683170e2609fa21fafd81d2891af4178 Merge pull request #1813 from lonvia/revert-concurrent-indexing revert building indexes concurrently --- diff --git a/docs/admin/Installation.md b/docs/admin/Installation.md index f3f54794..cf994c4c 100644 --- a/docs/admin/Installation.md +++ b/docs/admin/Installation.md @@ -36,8 +36,8 @@ For compiling: For running Nominatim: - * [PostgreSQL](https://www.postgresql.org) (9.3 - 11) - * [PostGIS](https://postgis.org) (2.2 - 2.5) + * [PostgreSQL](https://www.postgresql.org) (9.3+) + * [PostGIS](https://postgis.org) (2.2+) * [Python 3](https://www.python.org/) * [Psycopg2](https://initd.org/psycopg) * [PHP](https://php.net) (7.0 or later) @@ -45,10 +45,6 @@ For running Nominatim: * PHP-intl (bundled with PHP) * a webserver (apache or nginx are recommended) -!!! danger "Important" - Postgresql 12+ and Postgis 3.0+ are known to cause performance issues. They are - not recommended for a production installation at the moment. - For running continuous updates: * [pyosmium](https://osmcode.org/pyosmium/) (with Python 3) diff --git a/nominatim/nominatim.py b/nominatim/nominatim.py index 3e9c2f16..b29bf343 100755 --- a/nominatim/nominatim.py +++ b/nominatim/nominatim.py @@ -124,6 +124,15 @@ class DBConnection(object): self.wait() self.cursor = self.conn.cursor() + # Disable JIT and parallel workers as they are known to cause problems. + # Update pg_settings instead of using SET because it does not yield + # errors on older versions of Postgres where the settings are not + # implemented. + self.perform( + """ UPDATE pg_settings SET setting = -1 WHERE name = 'jit_above_cost'; + UPDATE pg_settings SET setting = 0 + WHERE name = 'max_parallel_workers_per_gather';""") + self.wait() def wait(self): """ Block until any pending operation is done.