aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/commit_ts.h
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-12-11 14:30:43 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-12-11 14:30:43 -0300
commit69e7235c93e2965cc0e17186bd044e4c54997c19 (patch)
treedc39e111afe0831f014a28aadfb7e17930291bf0 /src/include/access/commit_ts.h
parenta351705d8a7fbbc98c2449786d2ddfa845f21b6a (diff)
downloadpostgresql-69e7235c93e2965cc0e17186bd044e4c54997c19.tar.gz
postgresql-69e7235c93e2965cc0e17186bd044e4c54997c19.zip
Fix commit timestamp initialization
This module needs explicit initialization in order to replay WAL records in recovery, but we had broken this recently following changes to make other (stranger) scenarios work correctly. To fix, rework the initialization sequence so that it always takes place before WAL replay commences for both master and standby. I could have gone for a more localized fix that just added a "startup" call for the master server, but it seemed better to restructure the existing callers as well so that the whole thing made more sense. As a drawback, there is more control logic in xlog.c now than previously, but doing otherwise meant passing down the ControlFile flag, which seemed uglier as a whole. This also meant adding a check to not re-execute ActivateCommitTs if it had already been called. Reported by Fujii Masao. Backpatch to 9.5.
Diffstat (limited to 'src/include/access/commit_ts.h')
-rw-r--r--src/include/access/commit_ts.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/access/commit_ts.h b/src/include/access/commit_ts.h
index f5b39691e71..425f25870fd 100644
--- a/src/include/access/commit_ts.h
+++ b/src/include/access/commit_ts.h
@@ -34,7 +34,7 @@ extern Size CommitTsShmemBuffers(void);
extern Size CommitTsShmemSize(void);
extern void CommitTsShmemInit(void);
extern void BootStrapCommitTs(void);
-extern void StartupCommitTs(bool enabled);
+extern void StartupCommitTs(void);
extern void CommitTsParameterChange(bool xlrecvalue, bool pgcontrolvalue);
extern void CompleteCommitTsInitialization(void);
extern void ShutdownCommitTs(void);