]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/setup.php
disable multithreading in osm2pgsql
[nominatim.git] / utils / setup.php
index 3c038e66d66f2f2e3f1ac2849a9ea32e108088f1..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'];
                        $aDBInstances[$i] =& getDB(true);
                }
 
-               foreach(glob(CONST_BasePath.'/data/tiger2014/*.sql') as $sFile)
+               foreach(glob(CONST_Tiger_Data_Path.'/*.sql') as $sFile)
                {
                        echo $sFile.': ';
                        $hFile = fopen($sFile, "r");
                @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');