"standby switchover": abort if promotion candidate has WAL replay paused

If replay is paused, we can't be really sure that more WAL will be received
between the check and the promote operation, which would risk the promote
operation not taking place during the switchover (it would happen
as soon as WAL replay is resumed and pending WAL is replayed).

Therefore we simply quit with an informative slew of messages and
leave the user to sort it out.

GitHub #540.
This commit is contained in:
Ian Barwick
2019-02-05 16:25:44 +09:00
parent 2a529e7e8b
commit cce8b76171
4 changed files with 62 additions and 22 deletions

View File

@@ -37,7 +37,7 @@
</para>
<para>
&repmgr; will refuse to perform the switchover if an exclusive backup is running on
the current primary.
the current primary, or if WAL replay is paused on the standby.
</para>
</note>
<para>

View File

@@ -137,8 +137,8 @@
<note>
<para>
If an exclusive backup is running on the current primary, &repmgr; will not perform the
switchover.
If an exclusive backup is running on the current primary, or if WAL replay is paused on the standby,
&repmgr; will <emphasis>not</emphasis> perform the switchover.
</para>
</note>