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:
parent
41789d70d1
commit
156b7d48cc
@ -16,7 +16,6 @@ Restore Command
|
|||||||
#include "common/regExp.h"
|
#include "common/regExp.h"
|
||||||
#include "common/user.h"
|
#include "common/user.h"
|
||||||
#include "config/config.h"
|
#include "config/config.h"
|
||||||
#include "config/define.h"
|
|
||||||
#include "config/exec.h"
|
#include "config/exec.h"
|
||||||
#include "info/infoBackup.h"
|
#include "info/infoBackup.h"
|
||||||
#include "info/manifest.h"
|
#include "info/manifest.h"
|
||||||
@ -1410,7 +1409,7 @@ restoreRecoveryOption(unsigned int pgVersion)
|
|||||||
{
|
{
|
||||||
const String *targetAction = cfgOptionStr(cfgOptTargetAction);
|
const String *targetAction = cfgOptionStr(cfgOptTargetAction);
|
||||||
|
|
||||||
if (!strEqZ(targetAction, cfgDefOptionDefault(cfgCmdRestore, cfgDefOptTargetAction)))
|
if (!strEq(targetAction, varStr(cfgOptionDefault(cfgOptTargetAction))))
|
||||||
{
|
{
|
||||||
// Write recovery_target on supported PostgreSQL versions
|
// Write recovery_target on supported PostgreSQL versions
|
||||||
if (pgVersion >= PG_VERSION_RECOVERY_TARGET_ACTION)
|
if (pgVersion >= PG_VERSION_RECOVERY_TARGET_ACTION)
|
||||||
|
Loading…
Reference in New Issue
Block a user