1PG_AUTOCTL SET NODE CANDIDATE-PRpIgO_RaIuTtYoP(_G1f_)aAiUlToOvCeTrL SET NODE CANDIDATE-PRIORITY(1)
2
3
4
6 pg_autoctl set node candidate-priority - pg_autoctl set node candidate-
7 priority
8
9 pg_autoctl set candidate-priority - set candidate-priority property
10 from the monitor
11
13 This command sets the pg_autoctl candidate priority for a given node:
14
15 usage: pg_autoctl set node candidate-priority [ --pgdata ] [ --json ] [ --formation ] [ --name ] <priority: 0..100>
16
17 --pgdata path to data directory
18 --formation pg_auto_failover formation
19 --name pg_auto_failover node name
20 --json output data in the JSON format
21
23 See also pg_autoctl show settings for the full list of replication set‐
24 tings.
25
27 --pgdata
28 Location of the Postgres node being managed locally. Defaults to
29 the environment variable PGDATA. Use --monitor to connect to a
30 monitor from anywhere, rather than the monitor URI used by a lo‐
31 cal Postgres node managed with pg_autoctl.
32
33 --json Output JSON formatted data.
34
35 --formation
36 Show replication settings for given formation. Defaults to de‐
37 fault.
38
39 --name Show replication settings for given node, selected by name.
40
42 PGDATA
43 Postgres directory location. Can be used instead of the --pgdata op‐
44 tion.
45
46 PG_AUTOCTL_MONITOR
47 Postgres URI to connect to the monitor node, can be used instead of
48 the --monitor option.
49
50 XDG_CONFIG_HOME
51 The pg_autoctl command stores its configuration files in the stan‐
52 dard place XDG_CONFIG_HOME. See the XDG Base Directory Specifica‐
53 tion.
54
55 XDG_DATA_HOME
56 The pg_autoctl command stores its internal states files in the stan‐
57 dard place XDG_DATA_HOME, which defaults to ~/.local/share. See the
58 XDG Base Directory Specification.
59
61 $ pg_autoctl set node candidate-priority --name node1 65
62 12:47:59 92326 INFO Waiting for the settings to have been applied to the monitor and primary node
63 12:47:59 92326 INFO New state is reported by node 1 "node1" (localhost:5501): "apply_settings"
64 12:47:59 92326 INFO Setting goal state of node 1 "node1" (localhost:5501) to primary after it applied replication properties change.
65 12:47:59 92326 INFO New state is reported by node 1 "node1" (localhost:5501): "primary"
66 65
67
68 $ pg_autoctl set node candidate-priority --name node1 50 --json
69 12:48:05 92450 INFO Waiting for the settings to have been applied to the monitor and primary node
70 12:48:05 92450 INFO New state is reported by node 1 "node1" (localhost:5501): "apply_settings"
71 12:48:05 92450 INFO Setting goal state of node 1 "node1" (localhost:5501) to primary after it applied replication properties change.
72 12:48:05 92450 INFO New state is reported by node 1 "node1" (localhost:5501): "primary"
73 {
74 "candidate-priority": 50
75 }
76
78 Microsoft
79
81 Copyright (c) Microsoft Corporation. All rights reserved.
82
83
84
85
862.0 Sep 1P3G,_A2U0T2O3CTL SET NODE CANDIDATE-PRIORITY(1)