From 40b061afd2c187ee48d7acc84e2bc7520b428fe4 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 5 Jan 2023 11:34:56 +0100 Subject: [PATCH] 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). --- nominatim/tools/exec_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nominatim/tools/exec_utils.py b/nominatim/tools/exec_utils.py index ed3bb53b..a452d297 100644 --- a/nominatim/tools/exec_utils.py +++ b/nominatim/tools/exec_utils.py @@ -118,7 +118,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']) ] -- 2.39.5