puppet: wal-g backups are required for replication.

Previously, it was possible to configure `wal-g` backups without
replication enabled; this resulted in only daily backups, not
streaming backups.  It was also possible to enable replication without
configuring the `wal-g` backups bucket; this simply failed to work.

Make `wal-g` backups always streaming, and warn loudly if replication
is enabled but `wal-g` is not configured.
This commit is contained in:
Alex Vandiver
2022-03-11 02:39:34 +00:00
committed by Tim Abbott
parent 6496d43148
commit 6f5ae8d13d
5 changed files with 19 additions and 28 deletions

View File

@@ -508,23 +508,15 @@ things you need to be careful about when configuring it:
Zulip's configuration allows for [warm standby database
replicas][warm-standby] as a disaster recovery solution; see the
linked PostgreSQL documentation for details on this type of
deployment. Zulip's configuration leverages `wal-g`, our [database
backup solution][wal-g], and thus requires that it be configured for
the primary and all secondary warm standby replicas.
deployment. Zulip's configuration builds on top of `wal-g`, our
[database backup solution][wal-g], and thus requires that it be
configured for the primary and all secondary warm standby replicas.
The primary should have log-shipping enabled, with:
Warm spare replicas should also have `wal-g` backups configured, and
their primary replica and replication username set:
```ini
[postgresql]
replication = yes
```
Warm spare replicas should have log-shipping enabled, and their
primary replica and replication username configured:
```ini
[postgresql]
replication = yes
replication_user = replicator
replication_primary = hostname-of-primary.example.com
```
@@ -688,14 +680,6 @@ setting](https://www.postgresql.org/docs/current/runtime-config-connection.html#
Override PostgreSQL's [`random_page_cost`
setting](https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-RANDOM-PAGE-COST)
#### `replication`
Set to true to enable replication to enable [log shipping replication
between PostgreSQL servers](#postgresql-warm-standby). This should be
enabled on the primary, as well as any replicas, and further requires
configuration of
[wal-g](export-and-import.md#backup-details).
#### `replication_primary`
On the [warm standby replicas](#postgresql-warm-standby), set to the