Documentation
¶
Overview ¶
Package replication contains the code relative to the synchronous replication feature
Index ¶
- func CrossDomainConstraintSatisfied(cluster *apiv1.Cluster) (satisfied bool, topologyUsable bool)
- func GetExpectedSyncReplicasNumber(ctx context.Context, cluster *apiv1.Cluster) int
- func GetSyncReplicasBounds(cluster *apiv1.Cluster) (minReplicas, maxReplicas int)
- func GetSynchronousStandbyNames(ctx context.Context, cluster *apiv1.Cluster) postgres.SynchronousStandbyNamesConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CrossDomainConstraintSatisfied ¶
CrossDomainConstraintSatisfied reports whether enough electable standbys are in a failure domain different from the primary's for the failure domain constraint to be applied to synchronous_standby_names, using the same candidates and threshold as the replication path. The second return value is false when the failure domain keys are not configured or the topology cannot be used.
func GetExpectedSyncReplicasNumber ¶
GetExpectedSyncReplicasNumber computes the actual number of required synchronous replicas
func GetSyncReplicasBounds ¶
GetSyncReplicasBounds returns the minimum and the maximum number of synchronous replicas the cluster is configured to have.
With the legacy configuration these are `.spec.minSyncReplicas` and `.spec.maxSyncReplicas`. With `.spec.postgresql.synchronous` the maximum is the configured `number`, and the minimum is the same number when the data durability is required, or zero when it is preferred, as the number of synchronous replicas can then be lowered to what is available.
func GetSynchronousStandbyNames ¶
func GetSynchronousStandbyNames(ctx context.Context, cluster *apiv1.Cluster) postgres.SynchronousStandbyNamesConfig
GetSynchronousStandbyNames gets the value to be applied to synchronous_standby_names
Types ¶
This section is empty.