diff --git a/CHANGELOG.md b/CHANGELOG.md index 0325733..97509e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.4.9 + +* added **max_standby_archive_delay** and **max_standby_streaming_delay** + ## 0.4.8 * added compliance check for **check_postgres_datadir** diff --git a/manifests/init.pp b/manifests/init.pp index c9b53db..c6fd2fe 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -61,7 +61,6 @@ $max_wal_senders = '5', $checkpoint_segments = '16', $wal_keep_segments = '0', - $hot_standby = false, $pidfile = undef, $log_directory = $postgresql::params::log_directory_default, $log_filename = $postgresql::params::log_filename_default, @@ -116,6 +115,9 @@ $max_worker_processes = $::processorcount, $max_parallel_workers = $::processorcount, $max_parallel_workers_per_gather = max(2, ceiling(sprintf('%f', ($::processorcount)/2))), + $hot_standby = false, + $max_standby_archive_delay = '30s', + $max_standby_streaming_delay = '30s', $ensure_nagios_checks = 'present', $basedir_nagios_checks = '/usr/local/bin', ) inherits postgresql::params { diff --git a/metadata.json b/metadata.json index ac833a1..68f7ef8 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "eyp-postgresql", - "version": "0.4.8", + "version": "0.4.9", "author": "eyp", "summary": "postgresql and pgbounce installation, configuration and management", "license": "Apache-2.0", diff --git a/templates/postgresconf.erb b/templates/postgresconf.erb index 8a8b31a..682c739 100644 --- a/templates/postgresconf.erb +++ b/templates/postgresconf.erb @@ -253,10 +253,10 @@ wal_keep_segments = <%= @wal_keep_segments %> # in logfile segments, 16MB each; hot_standby = <%= scope.function_bool2onoff([@hot_standby]) %> # "on" allows queries during recovery # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries +max_standby_archive_delay = <%= @max_standby_archive_delay %> # max delay before canceling queries # when reading WAL from archive; # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries +max_standby_streaming_delay = <%= @max_standby_streaming_delay %> # max delay before canceling queries # when reading streaming WAL; # -1 allows indefinite delay #wal_receiver_status_interval = 10s # send replies at least this often