M1 v23
A Postgres cluster with a primary and a streaming replica, one Barman server, and any number of additional replicas cascaded from the first one. This architecture is suitable for testing, demonstrating and learning. We plan to release a production primary/standby architecture for TPA in the near future.
In default configuration this architecture uses open source software only. To use subscription-only EDB software with this architecture requires credentials for EDB Repos 1.0. If you choose EDB Advanced Server (EPAS) you will also require credentials for the legacy 2ndQuadrant repos. See How TPA uses 2ndQuadrant and EDB repositories for more detail on this topic.
Default layout
By default, the primary has one read-only replica attached in the same location; the replica, in turn, has one cascaded replica attached in a different location, where the Barman server is also configured to take backups from the primary.
If there is an even number of Postgres nodes, the Barman node is additionally configured as a witness. This ensures that the number of nodes is always odd, which is convenient when enabling automatic failover.
Cluster configuration
Overview of configuration options
An example invocation of tpaexec configure
for this architecture
is shown below.
You can list all available options using the help command.
The tables below describe the mandatory options for M1 and additional important options. More detail on the options is provided in the following section.
Mandatory Options
Parameter | Description |
---|---|
--architecture (-a ) | Must be set to M1 . |
Postgres flavour and version (e.g. --postgresql 15 ) | A valid flavour and version specifier. |
Additional Options
Parameter | Description | Behaviour if omitted |
---|---|---|
--platform | One of aws , docker , bare . | Defaults to aws . |
--num-cascaded-replicas | The number of cascaded replicas from the first replica. | Defaults to 1. |
--failover-manager | Select the failover manager from efm , repmgr and patroni . | TPA will select EFM as the failover manager for EPAS, and repmgr for all other flavours. |
--enable-efm | Configure Failover Manager as the cluster failover manager. | See --failover-manager above. |
--enable-repmgr | Configure Replication Manager as the cluster failover manager. | See --failover-manager above. |
--enable-patroni | Configure Patroni as the cluster failover manager. | See --failover-manager above. |
--enable-haproxy | 2 additional nodes will be added as a load balancer layer. Only supported with Patroni as the failover manager. | HAproxy nodes will not be added to the cluster. |
--patroni-dcs | Select the Distributed Configuration Store backend for patroni. Only option is etcd at this time. Only supported with Patroni as the failover manager. | Defaults to etcd . |
More detail about M1 configuration
You may optionally specify --num-cascaded-replicas N
to request N
cascaded replicas (including 0 for none; default: 1).
You may also specify any of the options described by
tpaexec help configure-options
.
- On this page
- Default layout
- Cluster configuration