aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-10-02 12:49:01 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-10-02 12:49:01 -0300
commite06b2e1d2ecde5cef469b9eac3dc5bf825a29a26 (patch)
tree013f28a7428c4282bb04c7a8ca9aac3747ea0390 /src/backend/access/transam/commit_ts.c
parentcdcae2b6a7d263b2771b6386af626b47ce17da19 (diff)
downloadpostgresql-e06b2e1d2ecde5cef469b9eac3dc5bf825a29a26.tar.gz
postgresql-e06b2e1d2ecde5cef469b9eac3dc5bf825a29a26.zip
Don't disable commit_ts in standby if enabled locally
Bug noticed by Fujii Masao
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
-rw-r--r--src/backend/access/transam/commit_ts.c5
1 files 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);
}