]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/replicate.erb
Switch rhaegal to use the test replication feed
[chef.git] / cookbooks / tile / templates / default / replicate.erb
index 83fec6fb7d123ff94965c7d0fec93b939bd4f2a9..4e96d767d8dd1696d44c4a78427b3c2c68e9e170 100644 (file)
@@ -17,6 +17,11 @@ exec > /var/log/tile/replicate.log 2>&1
 
 # Change to the replication state directory
 cd /var/lib/replicate
+<% if @postgresql_version >= 12 -%>
+
+# Disable JIT and parallel workers in postgres
+export PGOPTIONS="-c jit=off -c max_parallel_workers_per_gather=0"
+<% end -%>
 
 # Install exit handler
 trap onexit EXIT
@@ -31,7 +36,7 @@ do
     cp sequence.txt sequence-prev.txt
 
     # Fetch the next set of changes
-    pyosmium-get-changes --sequence-file=sequence.txt --outfile=${file}
+    pyosmium-get-changes --server=<%= node[:tile][:replication][:url] %> --sequence-file=sequence.txt --outfile=${file}
 
     # Save exit status
     status=$?