1PG_AUTOCTL DISABLE MAINTENANCE(1p)g_auto_failovePrG_AUTOCTL DISABLE MAINTENANCE(1)
2
3
4

NAME

6       pg_autoctl disable maintenance - pg_autoctl disable maintenance
7
8       pg_autoctl  disable  maintenance - Disable Postgres maintenance mode on
9       this node
10

SYNOPSIS

12       A pg_auto_failover can be put to a maintenance state. The Postgres node
13       is  then still registered to the monitor, and is known to be unreliable
14       until maintenance is disabled. A node in the maintenance state is not a
15       candidate for promotion.
16
17       Typical  use of the maintenance state include Operating System or Post‐
18       gres reboot, e.g. when applying security upgrades.
19
20           usage: pg_autoctl disable maintenance  [ --pgdata --allow-failover ]
21
22          --pgdata      path to data directory
23

OPTIONS

25       --pgdata
26              Location of the Postgres node being managed locally. Defaults to
27              the  environment  variable PGDATA. Use --monitor to connect to a
28              monitor from anywhere, rather than the monitor URI used by a lo‐
29              cal Postgres node managed with pg_autoctl.
30
31       --formation
32              Target formation where to disable secondary feature.
33

EXAMPLES

35          $ pg_autoctl show state
36           Name |  Node |      Host:Port |       LSN |   Connection |       Current State |      Assigned State
37          ------+-------+----------------+-----------+--------------+---------------------+--------------------
38          node1 |     1 | localhost:5501 | 0/4000810 |   read-write |             primary |             primary
39          node2 |     2 | localhost:5502 | 0/4000810 |    read-only |           secondary |           secondary
40          node3 |     3 | localhost:5503 | 0/4000810 |         none |         maintenance |         maintenance
41
42          $ pg_autoctl disable maintenance --pgdata node3
43          12:06:37 47542 INFO  Listening monitor notifications about state changes in formation "default" and group 0
44          12:06:37 47542 INFO  Following table displays times when notifications are received
45              Time |  Name |  Node |      Host:Port |       Current State |      Assigned State
46          ---------+-------+-------+----------------+---------------------+--------------------
47          12:06:37 | node3 |     3 | localhost:5503 |         maintenance |          catchingup
48          12:06:37 | node3 |     3 | localhost:5503 |          catchingup |          catchingup
49          12:06:37 | node3 |     3 | localhost:5503 |          catchingup |           secondary
50          12:06:37 | node3 |     3 | localhost:5503 |           secondary |           secondary
51
52          $ pg_autoctl show state
53           Name |  Node |      Host:Port |       LSN |   Connection |       Current State |      Assigned State
54          ------+-------+----------------+-----------+--------------+---------------------+--------------------
55          node1 |     1 | localhost:5501 | 0/4000848 |   read-write |             primary |             primary
56          node2 |     2 | localhost:5502 | 0/4000848 |    read-only |           secondary |           secondary
57          node3 |     3 | localhost:5503 | 0/4000000 |    read-only |           secondary |           secondary
58

AUTHOR

60       Microsoft
61
63       Copyright (c) Microsoft Corporation. All rights reserved.
64
65
66
67
681.6                              Aug 04, 2022PG_AUTOCTL DISABLE MAINTENANCE(1)
Impressum