From 156b7d48cce789cc6e435219062ceeadbbb7b494 Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 20 Oct 2020 12:39:23 -0400 Subject: [PATCH] Get target-action default from cfgOptionDefault() in restore command. cfgDefOptionDefault() worked but the default is available without having to peek into config definitions. --- src/command/restore/restore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/command/restore/restore.c b/src/command/restore/restore.c index 35336304a..59799bb6a 100644 --- a/src/command/restore/restore.c +++ b/src/command/restore/restore.c @@ -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)