Skip to content
Snippets Groups Projects
Commit cc3ee39c authored by Michael Banck's avatar Michael Banck
Browse files

PgCommon.pm: Guard against empty %conf in read_cluster_conf_file()

parent 9e39e4bd
No related branches found
No related tags found
1 merge request!25Warn about unreadable postgresql.conf in pg_lsclusters
Pipeline #830582 failed
......@@ -282,7 +282,7 @@ sub read_cluster_conf_file {
my ($version, $cluster, $configfile, $missing_ok) = @_;
my %conf = read_conf_file(cluster_conf_filename($version, $cluster, $configfile), $missing_ok);
if ($version >= 9.4 and $configfile eq 'postgresql.conf') { # merge settings changed by ALTER SYSTEM
if (%conf and $version >= 9.4 and $configfile eq 'postgresql.conf') { # merge settings changed by ALTER SYSTEM
# data_directory cannot be changed by ALTER SYSTEM
my $data_directory = cluster_data_directory($version, $cluster, \%conf);
# allow auto.conf to be missing; happens during early pg_upgradecluster when data_directory is still pointing to the old cluster
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment