]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/replicate.erb
Specify database for osm2pgsql on rendering servers
[chef.git] / cookbooks / tile / templates / default / replicate.erb
index 24e41819846c13fccdb89bce29739e45164cf8a1..145f6eb407c9f35e980b7a366a2a035143e15c5b 100644 (file)
@@ -2,9 +2,10 @@
 
 # DO NOT EDIT - This file is being maintained by Chef
 
-# Initialize timestamp with day of latest planet dump
-# Setting to midnight ensures we get conistent data after first run
-# osmosis --read-replication-interval-init
+# Before running updates, the replication needs to be set up with the timestamp
+# set to the day of the latest planet dump. Setting to midnight ensures we get
+# conistent data after first run. osmosis --read-replication-interval-init is
+# used to initially create the state file
 
 # Define exit handler
 function onexit {
@@ -67,9 +68,9 @@ do
 
             # Apply the changes to the database
 <% if node[:tile][:node_file] -%>
-            osm2pgsql --slim --append --flat-nodes=<%= node[:tile][:node_file] %> ${file}
+            osm2pgsql --database gis --slim --append --number-processes=1 --flat-nodes=<%= node[:tile][:node_file] %> ${file}
 <% else -%>
-            osm2pgsql --slim --append ${file}
+            osm2pgsql --database gis --slim --append --number-processes=1 ${file}
 <% end -%>
 
             # No need to rollback now