Skip to content

Commit ec8f8d9

Browse files
authored
Get rid of the JOIN_PRIMARY state. (#796)
* Get rid of the JOIN_PRIMARY state. We still need to maintain backward compatibility of course, in case there is an upgrade where one node is in JOIN_PRIMARY and then we want to be able to continue working with the node. Now, any node that reports JOIN_PRIMARY is unconditionnally assigned PRIMARY instead, and we never assign JOIN_PRIMARY anymore. We still have some code that matches the state in the group level FSM, and we keep the full compat on the client side for the moment. * Per review, preserve our WAIT_PRIMARY to PRIMARY transition. * Per review, APPLY_SETTINGS is only required when replicationQuorum.
1 parent d5a73eb commit ec8f8d9

File tree

9 files changed

+450
-494
lines changed

9 files changed

+450
-494
lines changed

docs/failover-state-machine.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ all the other nodes.
6767

6868
In the previous diagram we can see that we have a list of six states where
6969
the application can connect to a read-write Postgres service: ``single``,
70-
``wait_primary``, ``primary``, ``prepare_maintenance``, ``apply_settings``,
71-
and ``join_primary``.
70+
``wait_primary``, ``primary``, ``prepare_maintenance``, and ``apply_settings``.
7271

7372
Init
7473
^^^^
@@ -111,6 +110,12 @@ allows the primary node to apply necessary changes to its HBA setup before
111110
allowing the new node joining the system to run the ``pg_basebackup``
112111
command.
113112

113+
.. important::
114+
115+
This state has been deprecated, and is no longer assigned to nodes. Any
116+
time we would have used ``join_primary`` before, we now use ``primary``
117+
instead.
118+
114119
Primary
115120
^^^^^^^
116121

docs/tikz/arch-multi-standby.svg

Lines changed: 4 additions & 4 deletions
Loading

0 commit comments

Comments
 (0)