X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8c3a0efe8b75a06279998e66a932d8a56c483961..354487d7f475c0aecec484d077359f7ea44d4033:/utils/update.php?ds=sidebyside diff --git a/utils/update.php b/utils/update.php index d03cbed6..189a1825 100644 --- a/utils/update.php +++ b/utils/update.php @@ -55,6 +55,7 @@ date_default_timezone_set('Etc/UTC'); $oDB = new Nominatim\DB(); $oDB->connect(); +$fPostgresVersion = $oDB->getPostgresVersion(); $aDSNInfo = Nominatim\DB::parseDSN(CONST_Database_DSN); if (!isset($aDSNInfo['port']) || !$aDSNInfo['port']) $aDSNInfo['port'] = 5432; @@ -90,6 +91,12 @@ if (isset($aDSNInfo['password']) && $aDSNInfo['password']) { if (!is_null(CONST_Osm2pgsql_Flatnode_File) && CONST_Osm2pgsql_Flatnode_File) { $oOsm2pgsqlCmd->addParams('--flat-nodes', CONST_Osm2pgsql_Flatnode_File); } +if ($fPostgresVersion >= 11.0) { + $oOsm2pgsqlCmd->addEnvPair( + 'PGOPTIONS', + '-c jit=off -c max_parallel_workers_per_gather=0' + ); +} $oIndexCmd = (new \Nominatim\Shell(CONST_BasePath.'/nominatim/nominatim.py'))