diff options
-rw-r--r-- | src/backend/access/transam/commit_ts.c | 9 | ||||
-rw-r--r-- | src/backend/access/transam/xlog.c | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c index f17cc8d9769..a2c6a3a69a5 100644 --- a/src/backend/access/transam/commit_ts.c +++ b/src/backend/access/transam/commit_ts.c @@ -571,10 +571,9 @@ CompleteCommitTsInitialization(void) * any leftover data. * * Conversely, we activate the module if the feature is enabled. This is - * not necessary in a master system because we already did it earlier, but - * if we're in a standby server that got promoted which had the feature - * enabled and was following a master that had the feature disabled, this - * is where we turn it on locally. + * necessary for primary and standby as the activation depends on the + * control file contents at the beginning of recovery or when a + * XLOG_PARAMETER_CHANGE is replayed. */ if (!track_commit_timestamp) DeactivateCommitTs(); @@ -584,7 +583,7 @@ CompleteCommitTsInitialization(void) /* * Activate or deactivate CommitTs' upon reception of a XLOG_PARAMETER_CHANGE - * XLog record in a standby. + * XLog record during recovery. */ void CommitTsParameterChange(bool newvalue, bool oldvalue) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index b4ea4d40544..3fccb856adb 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -6419,11 +6419,12 @@ StartupXLOG(void) StartupMultiXact(); /* - * Ditto commit timestamps. In a standby, we do it if setting is enabled - * in ControlFile; in a master we base the decision on the GUC itself. + * Ditto for commit timestamps. Activate the facility if the setting is + * enabled in the control file, as there should be no tracking of commit + * timestamps done when the setting was disabled. This facility can be + * started or stopped when replaying a XLOG_PARAMETER_CHANGE record. */ - if (ArchiveRecoveryRequested ? - ControlFile->track_commit_timestamp : track_commit_timestamp) + if (ControlFile->track_commit_timestamp) StartupCommitTs(); /* |