]> git.openstreetmap.org Git - nominatim.git/commitdiff
keep slim tables in ssd for osm2pgsql
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 16 Aug 2012 19:34:48 +0000 (21:34 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 16 Aug 2012 19:34:48 +0000 (21:34 +0200)
sql/indices.src.sql
utils/setup.php

index 2e5dde71e66ecb25b0cd6b3be3a4ef51247464f0..fe42a7c3965a5b11c0b76c65614b17a0a850f037 100644 (file)
@@ -1,3 +1,9 @@
+-- osm2pgsql slim tables were on SSD just to speed up the import
+-- move them back to normal space
+ALTER INDEX planet_osm_nodes_pkey SET TABLESPACE "data";
+ALTER INDEX planet_osm_ways_nodes SET TABLESPACE "data";
+ALTER INDEX planet_osm_rels_parts SET TABLESPACE "data";
+
 -- Indices used only during search and update.
 -- These indices are created only after the indexing process is done.
 
index 663a9694c610b4ccdc2a40a0596c9df09777b592..989e9887926dca587d0090f8d3d1b968c3883c1a 100755 (executable)
                        echo "Please download and build osm2pgsql.\nIf it is already installed, check the path in your local settings (settings/local.php) file.\n";
                        fail("osm2pgsql not found in '$osm2pgsql'");
                }
-               $osm2pgsql .= ' --tablespace-slim-index ssd --tablespace-main-index ssd --tablespace-main-data ssd --tablespace-slim-data ssd';
+               $osm2pgsql .= ' --tablespace-slim-index ssd --tablespace-main-index ssd --tablespace-main-data ssd --tablespace-slim-data data';
                $osm2pgsql .= ' -lsc -O gazetteer --hstore';
                $osm2pgsql .= ' -C 16000';
                $osm2pgsql .= ' -d '.$aDSNInfo['database'].' '.$aCMDResult['osm-file'];
                        echo '.';
                }
                echo "\n";
+               pgsqlRunScript('ALTER TABLE place SET TABLESPACE "data"');
                echo "Reanalysing database...\n";
                pgsqlRunScript('ANALYSE');
        }