From 6de1b7428eff84ea2a205693038aca341db47269 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 24 Aug 2023 20:41:27 +0100 Subject: [PATCH] Allow wal_keep_size to be configured --- cookbooks/postgresql/attributes/default.rb | 1 + cookbooks/postgresql/templates/default/postgresql.conf.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/cookbooks/postgresql/attributes/default.rb b/cookbooks/postgresql/attributes/default.rb index 1123f4f1a..878407aec 100644 --- a/cookbooks/postgresql/attributes/default.rb +++ b/cookbooks/postgresql/attributes/default.rb @@ -26,6 +26,7 @@ default[:postgresql][:settings][:defaults][:min_wal_size] = "80MB" default[:postgresql][:settings][:defaults][:archive_mode] = "off" default[:postgresql][:settings][:defaults][:max_wal_senders] = "10" default[:postgresql][:settings][:defaults][:max_replication_slots] = "10" +default[:postgresql][:settings][:defaults][:wal_keep_size] = "0" default[:postgresql][:settings][:defaults][:hot_standby] = "on" default[:postgresql][:settings][:defaults][:hot_standby_feedback] = "off" default[:postgresql][:settings][:defaults][:seq_page_cost] = "1.0" diff --git a/cookbooks/postgresql/templates/default/postgresql.conf.erb b/cookbooks/postgresql/templates/default/postgresql.conf.erb index 9fba27e6e..b43afa783 100644 --- a/cookbooks/postgresql/templates/default/postgresql.conf.erb +++ b/cookbooks/postgresql/templates/default/postgresql.conf.erb @@ -89,6 +89,7 @@ restore_command = '<%= @settings[:restore_command] || @defaults[:restore_command max_wal_senders = <%= @settings[:max_wal_senders] || @defaults[:max_wal_senders] %> max_replication_slots = <%= @settings[:max_replication_slots] || @defaults[:max_replication_slots] %> +wal_keep_size = <%= @settings[:wal_keep_size] || @defaults[:wal_keep_size] %> # - Standby Servers - -- 2.39.5