@@ -221,6 +221,36 @@ PG database connection strings that the pglookout process should monitor.
221
221
Keys of the object should be names of the remotes and values must be valid
222
222
PostgreSQL connection strings or connection info objects.
223
223
224
+ ``cascading_replication_primary `` (default ``null ``)
225
+
226
+ Makes pglookout to consider matching instance as primary even though PG on
227
+ the node is in recovery mode. This allows setting cascading replication like
228
+ this::
229
+
230
+ Active cluster1 DR cluster 2
231
+ +---------------------+ +-------------------------+
232
+ | primary1 (writable) |<---------------| primary2 (non-writable) |
233
+ +---------------------+ +-------------------------+
234
+ ^ ^ ^ ^
235
+ | | | |
236
+ +------------+ +------------+ +------------+ +------------+
237
+ | secondary1 | | secondary2 | | secondary3 | | secondary4 |
238
+ +------------+ +------------+ +------------+ +------------+
239
+
240
+ In a setup like this, the DR cluster 2 could replace the active cluster as
241
+ a whole in case the active cluster runs in a region that becomes unavailable.
242
+ The ``primary2 ``, which is not writable and not really a primary in that sense, but
243
+ may be promoted as an actual writable primary in case all nodes in the active
244
+ cluster 1 fail, is observing the state of ``primary1 ``, ``secondary1 `` and ``secondary2 ``.
245
+
246
+ ``secondary3 `` and ``secondary4 `` in the DR cluster 2 need to be configured to replicate
247
+ from ``primary2 `` and need to monitor the availability of that so that they can
248
+ take over should it fail. However, as ``primary2 `` is not writable it would not by
249
+ default be considered to be a master node and replication would not get
250
+ configured correctly nor would availability monitoring work as expected.
251
+ Setting ``cascading_replication_primary=primary2 `` for ``secondary3 `` and ``secondary4 ``
252
+ makes this configuration work as expected.
253
+
224
254
``primary_conninfo_template ``
225
255
226
256
Connection string or connection info object template to use when setting a new
0 commit comments