X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/3ec71f5485e7f07c4ff2306d65d780951b61d71e..3ee5c4d242a98a13d89a02ba7998610a20969e0c:/cookbooks/postgresql/recipes/default.rb diff --git a/cookbooks/postgresql/recipes/default.rb b/cookbooks/postgresql/recipes/default.rb index affe9f502..a3ef7d23d 100644 --- a/cookbooks/postgresql/recipes/default.rb +++ b/cookbooks/postgresql/recipes/default.rb @@ -35,7 +35,6 @@ node[:postgresql][:versions].each do |version| standby_mode = settings[:standby_mode] || defaults[:standby_mode] primary_conninfo = settings[:primary_conninfo] || defaults[:primary_conninfo] - restore_command = settings[:restore_command] || defaults[:restore_command] passwords = if primary_conninfo data_bag_item(primary_conninfo[:passwords][:bag], @@ -87,28 +86,7 @@ node[:postgresql][:versions].each do |version| only_if { ::Dir.exist?("/var/lib/postgresql/#{version}/main") } end - if version.to_f < 12 && (restore_command || standby_mode == "on") - template "/var/lib/postgresql/#{version}/main/recovery.conf" do - source "recovery.conf.erb" - owner "postgres" - group "postgres" - mode "640" - variables :standby_mode => standby_mode, - :primary_conninfo => primary_conninfo, - :restore_command => restore_command, - :passwords => passwords - notifies :reload, "service[postgresql]" - only_if { ::Dir.exist?("/var/lib/postgresql/#{version}/main") } - end - else - template "/var/lib/postgresql/#{version}/main/recovery.conf" do - action :delete - notifies :reload, "service[postgresql]" - only_if { ::Dir.exist?("/var/lib/postgresql/#{version}/main") } - end - end - - if version.to_f > 11 && standby_mode == "on" + if standby_mode == "on" file "/var/lib/postgresql/#{version}/main/standby.signal" do owner "postgres" group "postgres"