From d62e80a9e4e96e08b1d0859eef6992627e3d4e60 Mon Sep 17 00:00:00 2001 From: glyn Date: Tue, 4 Oct 2016 16:17:44 +0100 Subject: [PATCH] Only try and map an obsoleted guc setting to a new one if the obsoleted setting was actually set in the old config. --- pg_upgrade_conf.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pg_upgrade_conf.pl b/pg_upgrade_conf.pl index b526aec..68e8774 100755 --- a/pg_upgrade_conf.pl +++ b/pg_upgrade_conf.pl @@ -201,7 +201,7 @@ sub modifyNewFile { if ($g_debug) { print "DEBUG: Target file key = $key value = $value\n"; } - if (!exists($g_gucs{$key}) && exists($g_gucs_map{$key})) { + if (!exists($g_gucs{$key}) && exists($g_gucs_map{$key}) && exists($g_gucs{$g_gucs_map{$key}[0]})) { $g_gucs{$key} = eval($g_gucs{$g_gucs_map{$key}[0]} . $g_gucs_map{$key}[1]) . (defined($g_gucs_map{$key}[2])?"$g_gucs_map{$key}[2]":""); $g_gucs_src{$key} .= "(mapped from $g_gucs_map{$key}[0] = $g_gucs{$g_gucs_map{$key}[0]})"; push(@lines, "# $g_gucs_map{$key}[0] = $g_gucs{$g_gucs_map{$key}[0]} # Obsoleted by $key as of pg $g_gucs_obs{$g_gucs_map{$key}[0]}[0] by $key = $g_gucs_map{$key}[0]$g_gucs_map{$key}[1] $g_gucs_map{$key}[2]"); -- 2.39.2