From 66a0daa5f23f535873d1ee832021ae8ec691249e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 2 Dec 2020 20:17:36 +0000 Subject: [PATCH] Disable max_replication_slots on old versions of Postgres --- cookbooks/postgresql/templates/default/postgresql.conf.erb | 2 ++ 1 file changed, 2 insertions(+) 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 - -- 2.43.2