From 6c61690ef36200f18c43415ddccdcddbf4d6227a 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 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']) ] -- 2.39.5