aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2019-01-11 10:25:06 +0100
committerPeter Eisentraut <peter@eisentraut.org>2019-01-11 11:02:03 +0100
commitff85306055ede1fbca86ca4dfc4d48172342462b (patch)
treea92ffefd5aab8c6fccb1d15f666490851b11b172 /src
parent43cbedab8ff1eef4088807ffc1a64a107de67af6 (diff)
downloadpostgresql-ff85306055ede1fbca86ca4dfc4d48172342462b.tar.gz
postgresql-ff85306055ede1fbca86ca4dfc4d48172342462b.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/misc/guc.c4
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index f81e0424e72..7eda7fdef9a 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -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;
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 1fa02d2c938..f7c1dee2402 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -261,8 +261,7 @@
# just after the specified recovery target (on)
# just before the recovery target (off)
# (change requires restart)
-#recovery_target_timeline = '' # unset means read from control file (default),
- # or set to 'latest' or timeline ID
+#recovery_target_timeline = 'current' # 'current', 'latest', or timeline ID
# (change requires restart)
#recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown'
# (change requires restart)