1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00

Fix check for improperly configured pg-path.

The check to verify that pg-path and data_directory are equal was not working because pg-path was getting overwritten with data_directory before validation took place.

Reported by James Chanco Jr.
This commit is contained in:
David Steele 2019-02-05 18:55:07 +02:00
parent be8f31a952
commit 6e88f93991
3 changed files with 19 additions and 4 deletions

View File

@ -14,6 +14,16 @@
<release-list>
<release date="XXXX-XX-XX" version="2.10dev" title="UNDER DEVELOPMENT">
<release-core-list>
<release-bug-list>
<release-item>
<release-item-contributor-list>
<release-item-ideator id="james.chanco.jr"/>
</release-item-contributor-list>
<p>Fix check for improperly configured <br-option>pg-path</br-option>.</p>
</release-item>
</release-bug-list>
<release-development-list>
<release-item>
<p>JSON improvements. Optimize parser implementation. Make the renderer more null tolerant.</p>
@ -6301,6 +6311,11 @@
<contributor-id type="github">Edib</contributor-id>
</contributor>
<contributor id="james.chanco.jr">
<contributor-name-display>James Chanco Jr</contributor-name-display>
<contributor-id type="github">jameschancojr</contributor-id>
</contributor>
<contributor id="jan.wieck">
<contributor-name-display>Jan Wieck</contributor-name-display>
<contributor-id type="github">wieck</contributor-id>

View File

@ -573,7 +573,7 @@ sub versionGet
}
# Get version and pg-path from
(my $strVersionNum, $self->{strDbPath}) =
my ($strVersionNum, $strDbPath) =
$self->executeSqlRow(
"select (select setting from pg_settings where name = 'server_version_num'), " .
" (select setting from pg_settings where name = 'data_directory')");
@ -600,7 +600,7 @@ sub versionGet
(
$strOperation,
{name => 'strDbVersion', value => $self->{strDbVersion}},
{name => 'strDbPath', value => $self->{strDbPath}}
{name => 'strDbPath', value => $strDbPath}
);
}

View File

@ -9349,7 +9349,7 @@ static const EmbeddedModule embeddedModule[] =
"return $self->{strDbVersion}, $self->{strDbPath};\n"
"}\n"
"\n\n"
"(my $strVersionNum, $self->{strDbPath}) =\n"
"my ($strVersionNum, $strDbPath) =\n"
"$self->executeSqlRow(\n"
"\"select (select setting from pg_settings where name = 'server_version_num'), \" .\n"
"\" (select setting from pg_settings where name = 'data_directory')\");\n"
@ -9372,7 +9372,7 @@ static const EmbeddedModule embeddedModule[] =
"(\n"
"$strOperation,\n"
"{name => 'strDbVersion', value => $self->{strDbVersion}},\n"
"{name => 'strDbPath', value => $self->{strDbPath}}\n"
"{name => 'strDbPath', value => $strDbPath}\n"
");\n"
"}\n"
"\n\n\n\n"