You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move pgo failover to use updated switchover plumbing
The manual failover/switchover command, `pgo failover`, now
uses the updated "switchover" plumbing that was introduced as
part of the rolling update changes. This ensures a unified
experience when performing an action that involves a failover.
Additionally, `pgo failover` now occurs inline: it does not
create a pgtask custom resource. This is due to both being a much
simpler process and the transactional nature of an immediate failover.
`pgo failover` can now also be executed with a --target flag. This
was actually always supported, but unavailable based upon a restriction
in the `pgo` client. When the `--target` flag is not used, the
PostgreSQL Operator will choose the best candidate for failing over.
Copy file name to clipboardExpand all lines: docs/content/pgo-client/reference/pgo_failover.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,12 @@ Performs a manual failover
9
9
10
10
Performs a manual failover. For example:
11
11
12
-
pgo failover mycluster
12
+
# have the operator select the best target candidate
13
+
pgo failover hippo
14
+
# get a list of target candidates
15
+
pgo failover hippo --query
16
+
# failover to a specific target candidate
17
+
pgo failover hippo --target=hippo-abcd
13
18
14
19
```
15
20
pgo failover [flags]
@@ -27,7 +32,7 @@ pgo failover [flags]
27
32
### Options inherited from parent commands
28
33
29
34
```
30
-
--apiserver-url string The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client.
35
+
--apiserver-url string The URL for the PostgreSQL Operator apiserver that will process the request from the pgo client. Note that the URL should **not** end in a '/'.
31
36
--debug Enable additional output for debugging.
32
37
--disable-tls Disable TLS authentication to the Postgres Operator.
33
38
--exclude-os-trust Exclude CA certs from OS default trust store
@@ -41,4 +46,4 @@ pgo failover [flags]
41
46
42
47
*[pgo](/pgo-client/reference/pgo/) - The pgo command line interface.
43
48
44
-
###### Auto generated by spf13/cobra on 1-Oct-2020
49
+
###### Auto generated by spf13/cobra on 1-Jan-2021
Each PostgreSQL cluster will manage its own availability. If you wish to manually fail over, you will need to use the [`pgo failover`]({{< relref "pgo-client/reference/pgo_failover.md">}}) command. First, determine which instance you want to fail over to:
65
+
Each PostgreSQL cluster will manage its own availability. If you wish to manually fail over, you will need to use the [`pgo failover`]({{< relref "pgo-client/reference/pgo_failover.md">}}) command.
66
+
67
+
There are two ways to issue a manual failover to your PostgreSQL cluster:
68
+
69
+
1. Allow for the PostgreSQL Operator to select the best replica candidate for failover.
70
+
2. Select your own replica candidate for failover.
To have the PostgreSQL Operator select the best replica candidate for failover, all you need to do is execute the following command:
77
+
78
+
```
79
+
pgo failover hippo
80
+
```
81
+
82
+
The PostgreSQL Operator will determine which is the best replica candidate to fail over to, and take into account factors such as replication lag and current timeline.
83
+
84
+
### Manual Failover - Manual Selection
85
+
86
+
If you wish to have your cluster manually failover, you must first query your determine which instance you want to fail over to. You can do so with the following command:
0 commit comments