Primary visibility consensus repmgr 5.2.0 vs Primary visibility consensus repmgr 5.1.0. Different behavior.
Opened this issue · 3 comments
Good time of the day, everyone.
Good time of the day, everyone.
In version 5.1.0, repmgr has always promoted Standby to Master.
In version 5.2.0, repmgr pays attention to the fact that for a long time the cluster members have seen the Master. In my case, cluster members see the Master almost always (1 second maximum).
And if the Master fails in version 5.2.0 with this behavior, the Standby will never be promoted to the Master. And there will always be an election canceled condition.
In this regard, I have questions:
- was there a bug in version 5.1.0 and version 5.2.0. is this behavior considered correct?
- is it possible to somehow change this behavior of repmgr, except how to set the parameter "primary_visibility_consensus" to False? For example, play around with some timeout parameters.
postgresql_zabservtstnode1_conf.txt
postgresql_zabservtstpve_conf.txt
repmgr_zabproxynode1_conf.txt
repmgr_zabservtstnode1_conf.txt
repmgr_zabservtstpve_conf.txt
my_systems.txt
postgresql_zabproxynode1_conf.txt
election_result_CANCELLED_repmgr._log.txt
There should be no changes between 5.1 and 5.2 in this area, and as far as I can tell nothing else has changed which might impact this.
I do note from the supplied log output this:
[2020-11-03 20:05:02] [NOTICE] witness node "zabproxynode1" (ID: 3) last saw primary node 2 second(s) ago, considering primary still visible
which indicates the functionality is working as intended, as the witness reports it can still see the primary.
Good time of the day, Ian Barwick.
In this thread, I'm talking about the fact that the time of visibility of the Master by the cluster members is very small (1 - 2 seconds). And if the Master fails, the cluster members will consider that the Master is still visible (it was visible 1 second ago) and the Reserve will never rise to the Master. This only happens when the "primary_visibility_consensus" parameter is enabled. To be honest, I did not observe such behavior of the repmgr on version 5.1.0, since I was writing a script for protecting the Master and I would immediately draw attention to the fact that Vedoms cannot promote to the Master.
I would not like to close this topic for now, I will explore it a little more. Perhaps you tell me something.
I made a mistake in the previous comment - the word "Vedoms". Here is the correct phrase:
I did not observe such behavior of the repmgr on version 5.1.0, since I was writing the script for the Master's fence and I would immediately pay attention to the fact that the Standby cannot promote to the Master.