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

Get target-action default from cfgOptionDefault() in restore command.

cfgDefOptionDefault() worked but the default is available without having to peek into config definitions.
This commit is contained in:
David Steele 2020-10-20 12:39:23 -04:00
parent 41789d70d1
commit 156b7d48cc

View File

@ -16,7 +16,6 @@ Restore Command
#include "common/regExp.h"
#include "common/user.h"
#include "config/config.h"
#include "config/define.h"
#include "config/exec.h"
#include "info/infoBackup.h"
#include "info/manifest.h"
@ -1410,7 +1409,7 @@ restoreRecoveryOption(unsigned int pgVersion)
{
const String *targetAction = cfgOptionStr(cfgOptTargetAction);
if (!strEqZ(targetAction, cfgDefOptionDefault(cfgCmdRestore, cfgDefOptTargetAction)))
if (!strEq(targetAction, varStr(cfgOptionDefault(cfgOptTargetAction))))
{
// Write recovery_target on supported PostgreSQL versions
if (pgVersion >= PG_VERSION_RECOVERY_TARGET_ACTION)