postgres.git / summary / log / commit / refs
commit e06b2e1d2ecde5cef469b9eac3dc5bf825a29a26
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Fri Oct 02 15:49:01 2015 +0000
First released in: 9.6.0, 9.5.0
Don't disable commit_ts in standby if enabled locally
Bug noticed by Fujii Masao
src/backend/access/transam/commit_ts.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c
index 79ca04a6eaf..24b82910835 100644
--- a/src/backend/access/transam/commit_ts.c
+++ b/src/backend/access/transam/commit_ts.c
@@ -583,14 +583,15 @@ CommitTsParameterChange(bool newvalue, bool oldvalue)
* pg_control. If the old value was already set, we already did this, so
* don't do anything.
*
- * If the module is disabled in the master, disable it here too.
+ * If the module is disabled in the master, disable it here too, unless
+ * the module is enabled locally.
*/
if (newvalue)
{
if (!track_commit_timestamp && !oldvalue)
ActivateCommitTs();
}
- else if (oldvalue)
+ else if (!track_commit_timestamp && oldvalue)
DeactivateCommitTs(false);
}
[parent: cdcae2b6a7d2]