From cb8149f8ea900e7048637dc6cb73a6d0b9aabc41 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 4 Sep 2023 10:45:52 +0200 Subject: [PATCH] reenable tablespace arguments for flex tables --- nominatim/tools/exec_utils.py | 5 +++++ settings/flex-base.lua | 2 ++ 2 files changed, 7 insertions(+) diff --git a/nominatim/tools/exec_utils.py b/nominatim/tools/exec_utils.py index 6fc3f6c9..c742e3e0 100644 --- a/nominatim/tools/exec_utils.py +++ b/nominatim/tools/exec_utils.py @@ -57,6 +57,11 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None: if options['tablespaces'][key]: cmd.extend((param, options['tablespaces'][key])) + if options['tablespaces']['main_data']: + env['NOMINATIM_TABLESPACE_PLACE_DATA'] = options['tablespaces']['main_data'] + if options['tablespaces']['main_index']: + env['NOMINATIM_TABLESPACE_PLACE_INDEX'] = options['tablespaces']['main_index'] + if options.get('disable_jit', False): env['PGOPTIONS'] = '-c jit=off -c max_parallel_workers_per_gather=0' diff --git a/settings/flex-base.lua b/settings/flex-base.lua index fbfb4d54..dc2c12ee 100644 --- a/settings/flex-base.lua +++ b/settings/flex-base.lua @@ -30,6 +30,8 @@ local place_table = osm2pgsql.define_table{ { column = 'extratags', type = 'hstore' }, { column = 'geometry', type = 'geometry', projection = 'WGS84', not_null = true }, }, + data_tablespace = os.getenv("NOMINATIM_TABLESPACE_PLACE_DATA"), + index_tablespace = os.getenv("NOMINATIM_TABLESPACE_PLACE_INDEX"), indexes = {} }