1PG_AUTOCTL SHOW SETTINGS(1)    pg_auto_failover    PG_AUTOCTL SHOW SETTINGS(1)
2
3
4

NAME

6       pg_autoctl show settings - pg_autoctl show settings
7
8       pg_autoctl  show  settings - Print replication settings for a formation
9       from the monitor
10

SYNOPSIS

12       This command allows to review all the replication settings of  a  given
13       formation (defaults to 'default' as usual):
14
15          usage: pg_autoctl show settings  [ --pgdata ] [ --json ] [ --formation ]
16
17          --pgdata      path to data directory
18          --monitor     pg_auto_failover Monitor Postgres URL
19          --json        output data in the JSON format
20          --formation   pg_auto_failover formation
21

DESCRIPTION

23       See also pg_autoctl get formation settings which is a synonym.
24
25       The  output  contains  setting  and values that apply at different con‐
26       texts, as shown here with a formation of four nodes,  where  node_4  is
27       not  participating  in  the replication quorum and also not a candidate
28       for failover:
29
30          $ pg_autoctl show settings
31             Context |    Name |                   Setting | Value
32           ----------+---------+---------------------------+-------------------------------------------------------------
33           formation | default |      number_sync_standbys | 1
34             primary |  node_1 | synchronous_standby_names | 'ANY 1 (pgautofailover_standby_3, pgautofailover_standby_2)'
35                node |  node_1 |        replication quorum | true
36                node |  node_2 |        replication quorum | true
37                node |  node_3 |        replication quorum | true
38                node |  node_4 |        replication quorum | false
39                node |  node_1 |        candidate priority | 50
40                node |  node_2 |        candidate priority | 50
41                node |  node_3 |        candidate priority | 50
42                node |  node_4 |        candidate priority | 0
43
44       Three replication settings context are listed:
45
46          1. The "formation" context contains a single  entry,  the  value  of
47             number_sync_standbys for the target formation.
48
49          2. The  "primary"  context  contains one entry per group of Postgres
50             nodes in the formation, and shows the current value of  the  syn‐
51             chronous_standby_names  Postgres setting as computed by the moni‐
52             tor. It should match what's currently set on the primary node un‐
53             less  while  applying  a change, as shown by the primary being in
54             the APPLY_SETTING state.
55
56          3. The "node" context contains two entry per nodes, one  line  shows
57             the  replication  quorum setting of nodes, and another line shows
58             the candidate priority of nodes.
59
60       This command gives an overview of all the settings that  apply  to  the
61       current formation.
62

OPTIONS

64       --pgdata
65              Location of the Postgres node being managed locally. Defaults to
66              the environment variable PGDATA. Use --monitor to connect  to  a
67              monitor from anywhere, rather than the monitor URI used by a lo‐
68              cal Postgres node managed with pg_autoctl.
69
70       --monitor
71              Postgres URI used to connect to the monitor. Must  use  the  au‐
72              toctl_node  username  and  target  the pg_auto_failover database
73              name. It is possible to show the Postgres URI from  the  monitor
74              node using the command pg_autoctl show uri.
75
76              Defaults  to  the  value  of  the  environment  variable  PG_AU‐
77              TOCTL_MONITOR.
78
79       --formation
80              Show the current replication settings for the  given  formation.
81              Defaults to the default formation.
82
83       --json Output a JSON formatted data instead of a table formatted list.
84

ENVIRONMENT

86       PGDATA
87          Postgres directory location. Can be used instead of the --pgdata op‐
88          tion.
89
90       PG_AUTOCTL_MONITOR
91          Postgres URI to connect to the monitor node, can be used instead  of
92          the --monitor option.
93
94       XDG_CONFIG_HOME
95          The  pg_autoctl  command stores its configuration files in the stan‐
96          dard place XDG_CONFIG_HOME. See the XDG  Base  Directory  Specifica‐
97          tion.
98
99       XDG_DATA_HOME
100          The pg_autoctl command stores its internal states files in the stan‐
101          dard place XDG_DATA_HOME, which defaults to ~/.local/share. See  the
102          XDG Base Directory Specification.
103

EXAMPLES

105          $ pg_autoctl show settings
106               Context |    Name |                   Setting | Value
107             ----------+---------+---------------------------+-------------------------------------------------------------
108             formation | default |      number_sync_standbys | 1
109               primary |   node1 | synchronous_standby_names | 'ANY 1 (pgautofailover_standby_2, pgautofailover_standby_3)'
110                  node |   node1 |        candidate priority | 50
111                  node |   node2 |        candidate priority | 50
112                  node |   node3 |        candidate priority | 50
113                  node |   node1 |        replication quorum | true
114                  node |   node2 |        replication quorum | true
115                  node |   node3 |        replication quorum | true
116

AUTHOR

118       Microsoft
119
121       Copyright (c) Microsoft Corporation. All rights reserved.
122
123
124
125
1262.0                              Sep 13, 2023      PG_AUTOCTL SHOW SETTINGS(1)
Impressum