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 formated data instead of a table formatted list.
84

EXAMPLES

86          $ pg_autoctl show settings
87               Context |    Name |                   Setting | Value
88             ----------+---------+---------------------------+-------------------------------------------------------------
89             formation | default |      number_sync_standbys | 1
90               primary |   node1 | synchronous_standby_names | 'ANY 1 (pgautofailover_standby_2, pgautofailover_standby_3)'
91                  node |   node1 |        candidate priority | 50
92                  node |   node2 |        candidate priority | 50
93                  node |   node3 |        candidate priority | 50
94                  node |   node1 |        replication quorum | true
95                  node |   node2 |        replication quorum | true
96                  node |   node3 |        replication quorum | true
97

AUTHOR

99       Microsoft
100
102       Copyright (c) Microsoft Corporation. All rights reserved.
103
104
105
106
1071.6                              Jan 21, 2022      PG_AUTOCTL SHOW SETTINGS(1)
Impressum