pgsql: Further tweak commit_timestamp behavior

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Further tweak commit_timestamp behavior
Date: 2015-12-03 22:23:02
Message-ID: E1a4cHG-0002fO-59@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Further tweak commit_timestamp behavior

As pointed out by Fujii Masao, we weren't quite there on a standby
behaving sanely: first because we were failing to acquire the correct
state in the case where no XLOG_PARAMETER_CHANGE message was sent
(because a checkpoint had already happened after the setting was changed
in the master, and then the standby was restarted); and second because
promoting the standby with the feature enabled failed to activate it if
the master had the feature disabled.

This patch fixes both those misbehaviors hopefully without
re-introducing any old problems.

Also change the hint emitted in a standby together with the error
message about the feature being disabled, to make it point out that the
place to chance the setting is the master. Otherwise, if the setting is
already enabled in the standby, it is very confusing to have it say that
the setting must be enabled ...

Authors: Álvaro Herrera, Petr Jelínek.
Backpatch to 9.5.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/820ddb2c2f162ef1b086d870e9da0702834b6f32

Modified Files
--------------
src/backend/access/transam/commit_ts.c | 32 +++++++++++++++++++-------------
src/backend/access/transam/xlog.c | 6 +++++-
src/include/access/commit_ts.h | 2 +-
3 files changed, 25 insertions(+), 15 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-12-04 19:44:58 pgsql: Further improve documentation of the role-dropping process.
Previous Message Tom Lane 2015-12-03 21:57:33 Re: [COMMITTERS] pgsql: Refactor Perl test code