From: Tom Hughes Date: Wed, 2 Dec 2020 20:17:36 +0000 (+0000) Subject: Disable max_replication_slots on old versions of Postgres X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/66a0daa5f23f535873d1ee832021ae8ec691249e Disable max_replication_slots on old versions of Postgres --- diff --git a/cookbooks/postgresql/templates/default/postgresql.conf.erb b/cookbooks/postgresql/templates/default/postgresql.conf.erb index 0096c2bf2..e2892f68a 100644 --- a/cookbooks/postgresql/templates/default/postgresql.conf.erb +++ b/cookbooks/postgresql/templates/default/postgresql.conf.erb @@ -86,7 +86,9 @@ archive_command = '<%= @settings[:archive_command] || @defaults[:archive_command # - Sending Server(s) - max_wal_senders = <%= @settings[:max_wal_senders] || @defaults[:max_wal_senders] %> +<% if @version.to_f >= 9.4 -%> max_replication_slots = <%= @settings[:max_replication_slots] || @defaults[:max_replication_slots] %> +<% end -%> # - Standby Servers -