|
3 | 3 |
|
4 | 4 | ## Member unregistration failed when removing machine
|
5 | 5 |
|
6 |
| -``` |
7 |
| -$ fly machines remove 9185340f4d3383 --app flex-testing |
| 6 | +Example failure when removing a machine: |
| 7 | +```bash |
| 8 | +fly machines remove 9185340f4d3383 --app flex-testing |
8 | 9 | machine 9185340f4d3383 was found and is currently in stopped state, attempting to destroy...
|
9 | 10 | unregistering postgres member 'fdaa:0:2e26:a7b:7d16:cff7:9849:2' from the cluster... <insert-random-error-here> (failed)
|
10 | 11 |
|
11 | 12 | 9185340f4d3383 has been destroyed
|
12 | 13 | ```
|
| 14 | + |
13 | 15 | Unfortionately, this can happen for a variety of reasons. If no action is taken, the member and associated replication slot will automatically be cleaned up after 24 hours. Depending on the current cluster size, problems can arise if the down member impacts the clusters ability to meet quorum. If this case, it's important to take action right away to prevent your cluster from going read-only.
|
14 | 16 |
|
15 | 17 |
|
16 | 18 | To address this, start by ssh'ing into one of your running Machines.
|
17 | 19 |
|
18 |
| -``` |
| 20 | +```bash |
19 | 21 | fly ssh console --app <app-name>
|
20 | 22 | ```
|
21 | 23 |
|
22 |
| -Switch to the postgres user and move into the home directory. |
23 |
| -``` |
| 24 | +Use the `repmgr` cli tool to view the current cluster state. |
| 25 | +```bash |
| 26 | +# Switch to the postgres user and move into the home directory. |
24 | 27 | su postgres
|
25 | 28 | cd ~
|
26 |
| -``` |
27 | 29 |
|
28 |
| -Use the `rempgr` cli tool to view the current cluster state. |
29 |
| -``` |
30 | 30 | repmgr daemon status
|
31 | 31 |
|
32 | 32 | ID | Name | Role | Status | Upstream | repmgrd | PID | Paused? | Upstream last seen
|
33 | 33 | ----+----------------------------------+---------+---------------+------------------------------------+---------+-----+---------+--------------------
|
34 | 34 | 376084936 | fdaa:0:2e26:a7b:7d18:1a68:804e:2 | primary | * running | | running | 630 | no | n/a
|
35 | 35 | 1349952263 | fdaa:0:2e26:a7b:7d17:4463:955d:2 | standby | ? unreachable | ? fdaa:0:2e26:a7b:7d18:1a68:804e:2 | n/a | n/a | n/a | n/a
|
36 | 36 | 1412735685 | fdaa:0:2e26:a7b:c850:8f12:fb1d:2 | standby | running | fdaa:0:2e26:a7b:7d18:1a68:804e:2 | running | 617 | no | 1 second(s) ago
|
37 |
| -``` |
38 | 37 |
|
39 |
| -Manually unregister the unreachable standby. |
40 | 38 | ```
|
| 39 | + |
| 40 | + |
| 41 | +Unregister the unreachable standby. |
| 42 | +```bash |
41 | 43 | repmgr standby unregister --node-id 1349952263
|
42 | 44 | ```
|
0 commit comments