1PG_AUTOCTL CREATE FORMATION(1) pg_auto_failover PG_AUTOCTL CREATE FORMATION(1)
2
3
4

NAME

6       pg_autoctl create formation - pg_autoctl create formation
7
8       pg_autoctl   create   formation   -  Create  a  new  formation  on  the
9       pg_auto_failover monitor
10

SYNOPSIS

12       This command registers a new formation on the monitor, with the  speci‐
13       fied kind:
14
15          usage: pg_autoctl create formation  [ --pgdata --monitor --formation --kind --dbname  --with-secondary --without-secondary ]
16
17          --pgdata      path to data directory
18          --monitor     pg_auto_failover Monitor Postgres URL
19          --formation   name of the formation to create
20          --kind        formation kind, either "pgsql" or "citus"
21          --dbname      name for postgres database to use in this formation
22          --enable-secondary     create a formation that has multiple nodes that can be
23                                 used for fail over when others have issues
24          --disable-secondary    create a citus formation without nodes to fail over to
25          --number-sync-standbys minimum number of standbys to confirm write
26

DESCRIPTION

28       A  single pg_auto_failover monitor may manage any number of formations,
29       each composed of at least one Postgres  service  group.  This  commands
30       creates  a  new formation so that it is then possible to register Post‐
31       gres nodes in the new formation.
32

OPTIONS

34       The following options are available to pg_autoctl create formation:
35
36       --pgdata
37              Location where to initialize a Postgres database cluster,  using
38              either  pg_ctl initdb or pg_basebackup. Defaults to the environ‐
39              ment variable PGDATA.
40
41       --monitor
42              Postgres URI used to connect to the monitor. Must  use  the  au‐
43              toctl_node  username  and  target  the pg_auto_failover database
44              name. It is possible to show the Postgres URI from  the  monitor
45              node using the command pg_autoctl show uri.
46
47       --formation
48              Name of the formation to create.
49
50       --kind A  pg_auto_failover  formation could be of kind pgsql or of kind
51              citus. At the moment citus formation kinds are  not  managed  in
52              the Open Source version of pg_auto_failover.
53
54       --dbname
55              Name  of  the database to use in the formation, mostly useful to
56              formation kinds citus where the  Citus  extension  is  only  in‐
57              stalled in a single target database.
58
59       --enable-secondary
60              The formation to be created allows using standby nodes. Defaults
61              to true. Mostly useful for Citus formations.
62
63       --disable-secondary
64              See --enable-secondary above.
65
66       --number-sync-standby
67              Postgres streaming replication uses synchronous_standby_names to
68              setup  how many standby nodes should have received a copy of the
69              transaction data. When using pg_auto_failover this setup is han‐
70              dled at the formation level.
71
72              Defaults to zero when creating the first two Postgres nodes in a
73              formation in the same group. When set to  zero  pg_auto_failover
74              uses  synchronous replication only when a standby node is avail‐
75              able: the idea is to allow failover, this setting does not allow
76              proper HA for Postgres.
77
78              When  adding  a  third node that participates in the quorum (one
79              primary, two secondaries), the setting is automatically  changed
80              from zero to one.
81

AUTHOR

83       Microsoft
84
86       Copyright (c) Microsoft Corporation. All rights reserved.
87
88
89
90
911.6                              Aug 04, 2022   PG_AUTOCTL CREATE FORMATION(1)
Impressum