@@ -5,12 +5,12 @@ While automatic failures are already baked-in, there may be times where a manual
5
5
_ ** Note: The promotion candidate must reside within your PRIMARY_REGION.** _
6
6
7
7
** 1. Connect to the Machine you wish to promote**
8
- ```
8
+ ``` bash
9
9
fly ssh console -s < app-name>
10
10
```
11
11
12
12
** 2. Confirm the member is healthy**
13
- ```
13
+ ``` bash
14
14
# Switch to the postgres user and move to the home directory.
15
15
su postgres
16
16
cd ~
@@ -34,7 +34,7 @@ Node "fdaa:0:2e26:a7b:7d17:9b36:6e4b:2":
34
34
35
35
Open up a separate terminal and stop the Machine running ` primary ` .
36
36
37
- ```
37
+ ``` bash
38
38
# Identify the primary
39
39
fly status --app < app-name>
40
40
@@ -50,7 +50,7 @@ fly machines stop 6e82931b729087 --app <app-name>
50
50
** 3. Run the standby promotion command**
51
51
Go back to the first terminal you opened that's connected to your promotion candidate.
52
52
53
- ```
53
+ ``` bash
54
54
# Issue a dry-run to ensure our candidate is eligible for promotion.
55
55
repmgr standby promote --siblings-follow --dry-run
56
56
@@ -66,7 +66,7 @@ INFO: prerequisites for executing STANDBY PROMOTE are met
66
66
** WARNING: It's important that you specify ` --siblings-follow ` , otherwise any other standbys will not be reconfigured to follow the new primary.**
67
67
68
68
If everything looks good, go ahead and re-run the command without the ` --dry-run ` argument.
69
- ```
69
+ ``` bash
70
70
repmgr standby promote --siblings-follow
71
71
72
72
NOTICE: promoting standby to primary
@@ -82,7 +82,7 @@ INFO: STANDBY FOLLOW successfully executed on all reachable sibling nodes
82
82
```
83
83
84
84
** 4. Start the Machine that was previously operating as Primary**
85
- ```
85
+ ``` bash
86
86
fly machines start 6e82931b729087 --app < app-name>
87
87
```
88
88
0 commit comments