From c3cc462c0ac88a8a45eb4f7d4b37199c76043179 Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Wed, 27 Feb 2019 17:47:58 +0100 Subject: [PATCH 1/2] disable archive mode when archiver is disabled --- manifests/postgres.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/manifests/postgres.pp b/manifests/postgres.pp index 7849a07..77838a9 100644 --- a/manifests/postgres.pp +++ b/manifests/postgres.pp @@ -299,9 +299,14 @@ default => $password, } + $archive_mode = $archiver ? { + true => 'on', + false => 'off', + } + # Configure PostgreSQL server for archive mode postgresql::server::config_entry { - 'archive_mode': value => 'on'; + 'archive_mode': value => $archive_mode; 'wal_level': value => $wal_level; } From 0125e143c99059d888ba30f145fc1e22d03298d1 Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Thu, 28 Feb 2019 10:19:24 +0100 Subject: [PATCH 2/2] use default value --- manifests/postgres.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/postgres.pp b/manifests/postgres.pp index 77838a9..7ff7929 100644 --- a/manifests/postgres.pp +++ b/manifests/postgres.pp @@ -301,7 +301,7 @@ $archive_mode = $archiver ? { true => 'on', - false => 'off', + default => 'off', } # Configure PostgreSQL server for archive mode