forked from hans/Nominatim
Merge pull request #1814 from lonvia/disable-jit
Disable JIT and parallel workers when indexing
This commit is contained in:
@@ -36,8 +36,8 @@ For compiling:
|
|||||||
|
|
||||||
For running Nominatim:
|
For running Nominatim:
|
||||||
|
|
||||||
* [PostgreSQL](https://www.postgresql.org) (9.3 - 11)
|
* [PostgreSQL](https://www.postgresql.org) (9.3+)
|
||||||
* [PostGIS](https://postgis.org) (2.2 - 2.5)
|
* [PostGIS](https://postgis.org) (2.2+)
|
||||||
* [Python 3](https://www.python.org/)
|
* [Python 3](https://www.python.org/)
|
||||||
* [Psycopg2](https://initd.org/psycopg)
|
* [Psycopg2](https://initd.org/psycopg)
|
||||||
* [PHP](https://php.net) (7.0 or later)
|
* [PHP](https://php.net) (7.0 or later)
|
||||||
@@ -45,10 +45,6 @@ For running Nominatim:
|
|||||||
* PHP-intl (bundled with PHP)
|
* PHP-intl (bundled with PHP)
|
||||||
* a webserver (apache or nginx are recommended)
|
* 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:
|
For running continuous updates:
|
||||||
|
|
||||||
* [pyosmium](https://osmcode.org/pyosmium/) (with Python 3)
|
* [pyosmium](https://osmcode.org/pyosmium/) (with Python 3)
|
||||||
|
|||||||
@@ -124,6 +124,15 @@ class DBConnection(object):
|
|||||||
self.wait()
|
self.wait()
|
||||||
|
|
||||||
self.cursor = self.conn.cursor()
|
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):
|
def wait(self):
|
||||||
""" Block until any pending operation is done.
|
""" Block until any pending operation is done.
|
||||||
|
|||||||
Reference in New Issue
Block a user