@@ -229,7 +229,7 @@ static char *recoveryEndCommand = NULL;
229
229
static char * archiveCleanupCommand = NULL ;
230
230
static RecoveryTargetType recoveryTarget = RECOVERY_TARGET_UNSET ;
231
231
static bool recoveryTargetInclusive = true;
232
- static RecoveryTargetAction actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_PAUSE ;
232
+ static RecoveryTargetAction recoveryTargetAction = RECOVERY_TARGET_ACTION_PAUSE ;
233
233
static TransactionId recoveryTargetXid ;
234
234
static TimestampTz recoveryTargetTime ;
235
235
static char * recoveryTargetName ;
@@ -4654,7 +4654,7 @@ readRecoveryCommandFile(void)
4654
4654
* head = NULL ,
4655
4655
* tail = NULL ;
4656
4656
bool recoveryPauseAtTargetSet = false;
4657
- bool actionAtRecoveryTargetSet = false;
4657
+ bool recoveryTargetActionSet = false;
4658
4658
4659
4659
4660
4660
fd = AllocateFile (RECOVERY_COMMAND_FILE , "r" );
@@ -4712,32 +4712,32 @@ readRecoveryCommandFile(void)
4712
4712
(errmsg_internal ("pause_at_recovery_target = '%s'" ,
4713
4713
item -> value )));
4714
4714
4715
- actionAtRecoveryTarget = recoveryPauseAtTarget ?
4715
+ recoveryTargetAction = recoveryPauseAtTarget ?
4716
4716
RECOVERY_TARGET_ACTION_PAUSE :
4717
4717
RECOVERY_TARGET_ACTION_PROMOTE ;
4718
4718
4719
4719
recoveryPauseAtTargetSet = true;
4720
4720
}
4721
- else if (strcmp (item -> name , "action_at_recovery_target " ) == 0 )
4721
+ else if (strcmp (item -> name , "recovery_target_action " ) == 0 )
4722
4722
{
4723
4723
if (strcmp (item -> value , "pause" ) == 0 )
4724
- actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_PAUSE ;
4724
+ recoveryTargetAction = RECOVERY_TARGET_ACTION_PAUSE ;
4725
4725
else if (strcmp (item -> value , "promote" ) == 0 )
4726
- actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_PROMOTE ;
4726
+ recoveryTargetAction = RECOVERY_TARGET_ACTION_PROMOTE ;
4727
4727
else if (strcmp (item -> value , "shutdown" ) == 0 )
4728
- actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_SHUTDOWN ;
4728
+ recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN ;
4729
4729
else
4730
4730
ereport (ERROR ,
4731
4731
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
4732
4732
errmsg ("invalid value for recovery parameter \"%s\"" ,
4733
- "action_at_recovery_target " ),
4733
+ "recovery_target_action " ),
4734
4734
errhint ("The allowed values are \"pause\", \"promote\" and \"shutdown\"." )));
4735
4735
4736
4736
ereport (DEBUG2 ,
4737
- (errmsg_internal ("action_at_recovery_target = '%s'" ,
4737
+ (errmsg_internal ("recovery_target_action = '%s'" ,
4738
4738
item -> value )));
4739
4739
4740
- actionAtRecoveryTargetSet = true;
4740
+ recoveryTargetActionSet = true;
4741
4741
}
4742
4742
else if (strcmp (item -> name , "recovery_target_timeline" ) == 0 )
4743
4743
{
@@ -4905,12 +4905,12 @@ readRecoveryCommandFile(void)
4905
4905
/*
4906
4906
* Check for mutually exclusive parameters
4907
4907
*/
4908
- if (recoveryPauseAtTargetSet && actionAtRecoveryTargetSet )
4908
+ if (recoveryPauseAtTargetSet && recoveryTargetActionSet )
4909
4909
ereport (ERROR ,
4910
4910
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
4911
4911
errmsg ("cannot set both \"%s\" and \"%s\" recovery parameters" ,
4912
4912
"pause_at_recovery_target" ,
4913
- "action_at_recovery_target " ),
4913
+ "recovery_target_action " ),
4914
4914
errhint ("The \"pause_at_recovery_target\" is deprecated." )));
4915
4915
4916
4916
@@ -4919,10 +4919,10 @@ readRecoveryCommandFile(void)
4919
4919
* of behaviour in 9.5; prior to this we simply ignored a request
4920
4920
* to pause if hot_standby = off, which was surprising behaviour.
4921
4921
*/
4922
- if (actionAtRecoveryTarget == RECOVERY_TARGET_ACTION_PAUSE &&
4923
- actionAtRecoveryTargetSet &&
4922
+ if (recoveryTargetAction == RECOVERY_TARGET_ACTION_PAUSE &&
4923
+ recoveryTargetActionSet &&
4924
4924
standbyState == STANDBY_DISABLED )
4925
- actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_SHUTDOWN ;
4925
+ recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN ;
4926
4926
4927
4927
/* Enable fetching from archive recovery area */
4928
4928
ArchiveRecoveryRequested = true;
@@ -6495,7 +6495,7 @@ StartupXLOG(void)
6495
6495
* this, Resource Managers may choose to do permanent corrective
6496
6496
* actions at end of recovery.
6497
6497
*/
6498
- switch (actionAtRecoveryTarget )
6498
+ switch (recoveryTargetAction )
6499
6499
{
6500
6500
case RECOVERY_TARGET_ACTION_SHUTDOWN :
6501
6501
/*
0 commit comments