X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3849fbb12e41a2f2c24097a20ca5f88bf0b3a56a..38fb71eaa47175097589efc5e7b39cc20de3e51b:/utils/update.php?ds=sidebyside diff --git a/utils/update.php b/utils/update.php index cefccd62..dd0dc6d0 100644 --- a/utils/update.php +++ b/utils/update.php @@ -56,6 +56,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; @@ -91,6 +92,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'))