From 803367b316f5c72c51153172a41b7a745f2d2d83 Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Mon, 18 Jan 2021 19:29:42 +0100 Subject: [PATCH] [type/__postgres_conf] Fix default detection when default is also set in config file e.g. port is usually also set to the default value in postgresql.conf --- cdist/conf/type/__postgres_conf/explorer/state | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/conf/type/__postgres_conf/explorer/state b/cdist/conf/type/__postgres_conf/explorer/state index da904b56..400b27e8 100644 --- a/cdist/conf/type/__postgres_conf/explorer/state +++ b/cdist/conf/type/__postgres_conf/explorer/state @@ -42,7 +42,7 @@ if su - "${postgres_user}" -c "psql postgres -twAc 'SHOW ${conf_name}'" \ then echo present else - case $(su - "${postgres_user}" -c "psql postgres -tAwc \"SELECT source FROM pg_settings WHERE name = '${conf_name}'\"") + case $(su - "${postgres_user}" -c "psql postgres -tAwc \"SELECT CASE WHEN source = 'default' OR setting = boot_val THEN 'default' ELSE source END FROM pg_settings WHERE name = '${conf_name}'\"") in ('') # invalid configuration parameter