mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-23 04:53:09 +03:00
disable JIT and parallel processing for osm2pgsql in updates
This is known to cause issues because of bad indexing statistics.
This commit is contained in:
parent
dd10c867db
commit
ff1be13d0e
@ -55,6 +55,7 @@ date_default_timezone_set('Etc/UTC');
|
|||||||
|
|
||||||
$oDB = new Nominatim\DB();
|
$oDB = new Nominatim\DB();
|
||||||
$oDB->connect();
|
$oDB->connect();
|
||||||
|
$fPostgresVersion = $oDB->getPostgresVersion();
|
||||||
|
|
||||||
$aDSNInfo = Nominatim\DB::parseDSN(CONST_Database_DSN);
|
$aDSNInfo = Nominatim\DB::parseDSN(CONST_Database_DSN);
|
||||||
if (!isset($aDSNInfo['port']) || !$aDSNInfo['port']) $aDSNInfo['port'] = 5432;
|
if (!isset($aDSNInfo['port']) || !$aDSNInfo['port']) $aDSNInfo['port'] = 5432;
|
||||||
@ -90,6 +91,10 @@ if (isset($aDSNInfo['password']) && $aDSNInfo['password']) {
|
|||||||
if (!is_null(CONST_Osm2pgsql_Flatnode_File) && CONST_Osm2pgsql_Flatnode_File) {
|
if (!is_null(CONST_Osm2pgsql_Flatnode_File) && CONST_Osm2pgsql_Flatnode_File) {
|
||||||
$oOsm2pgsqlCmd->addParams('--flat-nodes', 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'))
|
$oIndexCmd = (new \Nominatim\Shell(CONST_BasePath.'/nominatim/nominatim.py'))
|
||||||
|
Loading…
Reference in New Issue
Block a user