@@ -229,7 +229,7 @@ static char *recoveryEndCommand = NULL;
229229static char * archiveCleanupCommand = NULL ;
230230static RecoveryTargetType recoveryTarget = RECOVERY_TARGET_UNSET ;
231231static bool recoveryTargetInclusive = true;
232- static RecoveryTargetAction actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_PAUSE ;
232+ static RecoveryTargetAction recoveryTargetAction = RECOVERY_TARGET_ACTION_PAUSE ;
233233static TransactionId recoveryTargetXid ;
234234static TimestampTz recoveryTargetTime ;
235235static char * recoveryTargetName ;
@@ -4654,7 +4654,7 @@ readRecoveryCommandFile(void)
46544654* head = NULL ,
46554655* tail = NULL ;
46564656bool recoveryPauseAtTargetSet = false;
4657- bool actionAtRecoveryTargetSet = false;
4657+ bool recoveryTargetActionSet = false;
46584658
46594659
46604660fd = AllocateFile (RECOVERY_COMMAND_FILE ,"r" );
@@ -4712,32 +4712,32 @@ readRecoveryCommandFile(void)
47124712(errmsg_internal ("pause_at_recovery_target = '%s'" ,
47134713item -> value )));
47144714
4715- actionAtRecoveryTarget = recoveryPauseAtTarget ?
4715+ recoveryTargetAction = recoveryPauseAtTarget ?
47164716RECOVERY_TARGET_ACTION_PAUSE :
47174717RECOVERY_TARGET_ACTION_PROMOTE ;
47184718
47194719recoveryPauseAtTargetSet = true;
47204720}
4721- else if (strcmp (item -> name ,"action_at_recovery_target " )== 0 )
4721+ else if (strcmp (item -> name ,"recovery_target_action " )== 0 )
47224722{
47234723if (strcmp (item -> value ,"pause" )== 0 )
4724- actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_PAUSE ;
4724+ recoveryTargetAction = RECOVERY_TARGET_ACTION_PAUSE ;
47254725else if (strcmp (item -> value ,"promote" )== 0 )
4726- actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_PROMOTE ;
4726+ recoveryTargetAction = RECOVERY_TARGET_ACTION_PROMOTE ;
47274727else if (strcmp (item -> value ,"shutdown" )== 0 )
4728- actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_SHUTDOWN ;
4728+ recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN ;
47294729else
47304730ereport (ERROR ,
47314731(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
47324732errmsg ("invalid value for recovery parameter \"%s\"" ,
4733- "action_at_recovery_target " ),
4733+ "recovery_target_action " ),
47344734errhint ("The allowed values are \"pause\", \"promote\" and \"shutdown\"." )));
47354735
47364736ereport (DEBUG2 ,
4737- (errmsg_internal ("action_at_recovery_target = '%s'" ,
4737+ (errmsg_internal ("recovery_target_action = '%s'" ,
47384738item -> value )));
47394739
4740- actionAtRecoveryTargetSet = true;
4740+ recoveryTargetActionSet = true;
47414741}
47424742else if (strcmp (item -> name ,"recovery_target_timeline" )== 0 )
47434743{
@@ -4905,12 +4905,12 @@ readRecoveryCommandFile(void)
49054905/*
49064906 * Check for mutually exclusive parameters
49074907 */
4908- if (recoveryPauseAtTargetSet && actionAtRecoveryTargetSet )
4908+ if (recoveryPauseAtTargetSet && recoveryTargetActionSet )
49094909ereport (ERROR ,
49104910(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
49114911errmsg ("cannot set both \"%s\" and \"%s\" recovery parameters" ,
49124912"pause_at_recovery_target" ,
4913- "action_at_recovery_target " ),
4913+ "recovery_target_action " ),
49144914errhint ("The \"pause_at_recovery_target\" is deprecated." )));
49154915
49164916
@@ -4919,10 +4919,10 @@ readRecoveryCommandFile(void)
49194919 * of behaviour in 9.5; prior to this we simply ignored a request
49204920 * to pause if hot_standby = off, which was surprising behaviour.
49214921 */
4922- if (actionAtRecoveryTarget == RECOVERY_TARGET_ACTION_PAUSE &&
4923- actionAtRecoveryTargetSet &&
4922+ if (recoveryTargetAction == RECOVERY_TARGET_ACTION_PAUSE &&
4923+ recoveryTargetActionSet &&
49244924standbyState == STANDBY_DISABLED )
4925- actionAtRecoveryTarget = RECOVERY_TARGET_ACTION_SHUTDOWN ;
4925+ recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN ;
49264926
49274927/* Enable fetching from archive recovery area */
49284928ArchiveRecoveryRequested = true;
@@ -6495,7 +6495,7 @@ StartupXLOG(void)
64956495 * this, Resource Managers may choose to do permanent corrective
64966496 * actions at end of recovery.
64976497 */
6498- switch (actionAtRecoveryTarget )
6498+ switch (recoveryTargetAction )
64996499{
65006500case RECOVERY_TARGET_ACTION_SHUTDOWN :
65016501/*