From: Sarah Hoffmann Date: Wed, 1 Jul 2020 13:49:33 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~228 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/38fb71eaa47175097589efc5e7b39cc20de3e51b?ds=inline;hp=-c Merge remote-tracking branch 'upstream/master' --- 38fb71eaa47175097589efc5e7b39cc20de3e51b diff --combined utils/update.php index cefccd62,189a1825..dd0dc6d0 --- a/utils/update.php +++ b/utils/update.php @@@ -49,13 -49,13 +49,14 @@@ $aCMDOption getCmdOpt($_SERVER['argv'], $aCMDOptions, $aResult, true, true); if (!isset($aResult['index-instances'])) $aResult['index-instances'] = 1; + if (!isset($aResult['index-rank'])) $aResult['index-rank'] = 0; 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 -91,12 +92,12 @@@ if (isset($aDSNInfo['password']) && $aD 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'))