mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-27 23:15:12 +03:00
Merge pull request #1814 from lonvia/disable-jit
Disable JIT and parallel workers when indexing
This commit is contained in:
commit
3661c75b39
@ -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)
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user