1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Add value 'current' for recovery_target_timeline

This value represents the default behavior of using the current
timeline.  Previously, this was represented by an empty string.

(Before the removal of recovery.conf, this setting could not be chosen
explicitly but was used when recovery_target_timeline was not
mentioned at all.)

Discussion: https://www.postgresql.org/message-id/flat/6dd2c23a-4162-8469-410f-bfe146e28c0c@2ndquadrant.com/
Reviewed-by: David Steele <david@pgmasters.net>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
This commit is contained in:
Peter Eisentraut
2019-01-11 10:25:06 +01:00
parent 43cbedab8f
commit ff85306055
3 changed files with 8 additions and 7 deletions

View File

@ -3387,7 +3387,7 @@ static struct config_string ConfigureNamesString[] =
NULL
},
&recovery_target_timeline_string,
"",
"current",
check_recovery_target_timeline, assign_recovery_target_timeline, NULL
},
@ -11031,7 +11031,7 @@ check_recovery_target_timeline(char **newval, void **extra, GucSource source)
RecoveryTargetTimeLineGoal rttg = RECOVERY_TARGET_TIMELINE_CONTROLFILE;
RecoveryTargetTimeLineGoal *myextra;
if (strcmp(*newval, "") == 0)
if (strcmp(*newval, "current") == 0)
rttg = RECOVERY_TARGET_TIMELINE_CONTROLFILE;
else if (strcmp(*newval, "latest") == 0)
rttg = RECOVERY_TARGET_TIMELINE_LATEST;