]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/setup.php
disable multithreading in osm2pgsql
[nominatim.git] / utils / setup.php
index b49813a8ab7f056603e469b8fd8e7fcdfd2c1258..782665d7f61f9fbc096804e44c5a8d19ad7d265c 100755 (executable)
        }
 
        // Assume we can steal all the cache memory in the box (unless told otherwise)
-       $iCacheMemory = (isset($aCMDResult['osm2pgsql-cache'])?$aCMDResult['osm2pgsql-cache']:getCacheMemoryMB());
-       if ($iCacheMemory > getTotalMemoryMB())
+       if (isset($aCMDResult['osm2pgsql-cache']))
+       {
+               $iCacheMemory = $aCMDResult['osm2pgsql-cache'];
+       }
+       else
        {
                $iCacheMemory = getCacheMemoryMB();
-               echo "WARNING: resetting cache memory to $iCacheMemory\n";
        }
 
        $aDSNInfo = DB::parseDSN(CONST_Database_DSN);
                        $osm2pgsql .= ' --tablespace-main-data '.CONST_Tablespace_Place_Data;
                if (CONST_Tablespace_Place_Index)
                        $osm2pgsql .= ' --tablespace-main-index '.CONST_Tablespace_Place_Index;
-               $osm2pgsql .= ' -lsc -O gazetteer --hstore';
+               $osm2pgsql .= ' -lsc -O gazetteer --hstore --number-processes 1';
                $osm2pgsql .= ' -C '.$iCacheMemory;
                $osm2pgsql .= ' -P '.$aDSNInfo['port'];
                $osm2pgsql .= ' -d '.$aDSNInfo['database'].' '.$aCMDResult['osm-file'];
                @symlink(CONST_BasePath.'/website/reverse.php', $sTargetDir.'/reverse.php');
                @symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/search.php');
                @symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/index.php');
+               @symlink(CONST_BasePath.'/website/lookup.php', $sTargetDir.'/lookup.php');
                @symlink(CONST_BasePath.'/website/deletable.php', $sTargetDir.'/deletable.php');
                @symlink(CONST_BasePath.'/website/polygons.php', $sTargetDir.'/polygons.php');
                @symlink(CONST_BasePath.'/website/status.php', $sTargetDir.'/status.php');