From 9b604d155483db9f9e0db210c18f792835aa3271 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 23 Jan 2023 19:07:21 +0000 Subject: [PATCH] Upgrade dev server to postgres 15 --- cookbooks/dev/recipes/default.rb | 14 +++++++------- roles/dev.rb | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index a9e85008e..b8c589796 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -270,9 +270,9 @@ node[:postgresql][:versions].each do |version| package "postgresql-#{version}-postgis-3" end -if node[:postgresql][:clusters][:"14/main"] +if node[:postgresql][:clusters][:"15/main"] postgresql_user "apis" do - cluster "14/main" + cluster "15/main" end template "/usr/local/bin/cleanup-rails-assets" do @@ -331,12 +331,12 @@ if node[:postgresql][:clusters][:"14/main"] secret_key_base = persistent_token("dev", "rails", name, "secret_key_base") postgresql_database database_name do - cluster "14/main" + cluster "15/main" owner "apis" end postgresql_extension "#{database_name}_btree_gist" do - cluster "14/main" + cluster "15/main" database database_name extension "btree_gist" end @@ -377,7 +377,7 @@ if node[:postgresql][:clusters][:"14/main"] group "apis" repository details[:repository] revision details[:revision] - database_port node[:postgresql][:clusters][:"14/main"][:port] + database_port node[:postgresql][:clusters][:"15/main"][:port] database_name database_name database_username "apis" email_from "OpenStreetMap " @@ -448,7 +448,7 @@ if node[:postgresql][:clusters][:"14/main"] group "root" mode "640" variables :cgimap_port => cgimap_port, - :database_port => node[:postgresql][:clusters][:"14/main"][:port], + :database_port => node[:postgresql][:clusters][:"15/main"][:port], :database_name => database_name, :log_directory => log_directory end @@ -518,7 +518,7 @@ if node[:postgresql][:clusters][:"14/main"] postgresql_database database_name do action :drop - cluster "14/main" + cluster "15/main" end end end diff --git a/roles/dev.rb b/roles/dev.rb index e048537fa..c41dda8dc 100644 --- a/roles/dev.rb +++ b/roles/dev.rb @@ -127,7 +127,7 @@ default_attributes( } }, :postgresql => { - :versions => ["14"], + :versions => ["15"], :settings => { :defaults => { :max_connections => "500", @@ -137,7 +137,7 @@ default_attributes( :max_stack_depth => "4MB", :effective_cache_size => "4GB" }, - "14" => { + "15" => { :port => "5432", :wal_level => "logical", :max_replication_slots => "1" -- 2.39.5