mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-06 09:13:52 +02:00
Multiple fixes
- update docs to be more decriptive and cosistent with terminology - Remove name and uid for the standby cluster - Error out in case empty wal-path is provided for standby cluster
This commit is contained in:
@@ -176,7 +176,7 @@ explanation of `ttl` and `loop_wait` parameters.
|
||||
permanent replication slots that Patroni preserves after failover by re-creating them on the new primary immediately after doing a promote. Slots could be reconfigured with the help of `patronictl edit-config`. It is the responsibility of a user to avoid clashes in names between replication slots automatically created by Patroni for cluster members and permanent replication slots. Optional.
|
||||
|
||||
* **standby_cluster**
|
||||
initializes cluster as a standby creating a cascading replication, where elected master is streaming from specified remote location
|
||||
initializes cluster as a standby creating a cascading replication, where standby leader is streaming from specified remote location
|
||||
|
||||
## Postgres container resources
|
||||
|
||||
|
||||
+8
-3
@@ -256,15 +256,20 @@ to UTC, see [RFC 3339 section 5.6) 3339 section 5.6](https://www.ietf.org/rfc/rf
|
||||
|
||||
## Setting up a standby cluster
|
||||
|
||||
Standby clusters are like normal cluster but they are streaming from a remote master. Patroni supports it, [read this](https://github.com/zalando/patroni/blob/bd2c54581abb42a7d3a3da551edf0b8732eefd27/docs/replica_bootstrap.rst#standby-cluster) to know more about them. Currently operator supports setting up standby only through an S3 bucket. For this you need to add a section standby in the YAML file as follows.
|
||||
Standby clusters are like normal cluster but they are streaming from a remote cluster. Patroni supports it, [read this](https://github.com/zalando/patroni/blob/bd2c54581abb42a7d3a3da551edf0b8732eefd27/docs/replica_bootstrap.rst#standby-cluster) to know more about them.
|
||||
|
||||
As the first version of this feature, the only scenario covered by operator is to stream from a wal archive of the master. Following the more popular infrastructure of using Amazon's S3 buckets, it is mentioned as s3_wal_path here. To make a cluster as standby add a section standby in the YAML file as follows.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
standby:
|
||||
uid: "UID of the master cluster"
|
||||
cluster: "Name of the master cluster"
|
||||
s3_wal_path: "s3 bucket path to the master"
|
||||
```
|
||||
Things to note:
|
||||
|
||||
- An empty string is provided in s3_wal_path of the standby cluster will result in error and no statefulset will be created.
|
||||
- If standby is not needed, simply remove the standby_cluster section from the patroni through patronictl edit-config.
|
||||
- There is no way to transform a non-standby cluster to standby cluster through operator. Hence, if a cluster is created without standby section in YAML and later modified by adding that section, there will be no effect on the cluster. However, it can be done through Patroni by adding the standby_cluster section using patronictl edit-config. Note that the transformed standby cluster will not be doing any streaming, rather will just be in standby mode and allow read-only transactions only.
|
||||
|
||||
## Sidecar Support
|
||||
|
||||
|
||||
Reference in New Issue
Block a user