From: Sarah Hoffmann Date: Thu, 5 Jan 2023 10:34:56 +0000 (+0100) Subject: do not run osm2pgsql append with mutliple threads X-Git-Tag: v4.3.0~117 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/6c61690ef36200f18c43415ddccdcddbf4d6227a?hp=bf1f6a997ccdb115f7c77ab8ded34e80dca7abeb do not run osm2pgsql append with mutliple threads As the updates modify the placex table, there may be deadlocks when different objects want to forward modifications to the same place (for example because they are both linked to it). --- diff --git a/nominatim/tools/exec_utils.py b/nominatim/tools/exec_utils.py index 8417f146..566ac06e 100644 --- a/nominatim/tools/exec_utils.py +++ b/nominatim/tools/exec_utils.py @@ -119,7 +119,7 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None: cmd = [str(options['osm2pgsql']), '--hstore', '--latlon', '--slim', '--log-progress', 'true', - '--number-processes', str(options['threads']), + '--number-processes', '1' if options['append'] else str(options['threads']), '--cache', str(options['osm2pgsql_cache']), '--style', str(options['osm2pgsql_style']) ]