X-Git-Url: https://git.8kb.co.uk/?p=postgresql%2Fpg_upgrade_conf;a=blobdiff_plain;f=pg_upgrade_conf.pl;h=f04f19ca94610124f61051e676553d094984c5af;hp=b526aecb787393346e5599a536b4f8532578a5f0;hb=HEAD;hpb=b91f9da9268d7ba23b0c256a269e27c77c740f6b diff --git a/pg_upgrade_conf.pl b/pg_upgrade_conf.pl index b526aec..f04f19c 100755 --- a/pg_upgrade_conf.pl +++ b/pg_upgrade_conf.pl @@ -39,7 +39,7 @@ my %g_gucs; my %g_gucs_src; my $g_page_size = 8192; my $g_wal_segment_size = 2048; -my $g_wal_segment = sizePretty(8192*2048); +my $g_wal_segment = sizePretty($g_page_size*$g_wal_segment_size); # Settings that map onto obsolete settings # @@ -49,7 +49,7 @@ my %g_gucs_map = (max_wal_size => [ split(' ', "check my %g_gucs_obs = (max_fsm_pages => [ qw(8.3) ], max_fsm_relations => [ qw(8.3) ], ssl_renegotiation_limit => [ qw(9.3) ], - checkpoint_segments => [ qw(9.3 max_wal_size) ]); + checkpoint_segments => [ qw(9.5 max_wal_size) ]); my $g_non_default_count = 0; my $g_change_count = 0; @@ -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]");