committs.patch
text/x-diff
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/backend/access/transam/commit_ts.c | 3 | 2 |
commit 7441f88b746b7522f1714ed9fec95c3c4fe1dacb[m
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
AuthorDate: Fri Oct 2 11:39:44 2015 -0300
CommitDate: Fri Oct 2 11:39:44 2015 -0300
Don't disable commit_ts in standby if enabled locally
Bug noticed by Fujii Masao
diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c
index 79ca04a..24b8291 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);
}