mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 05:37:31 +02:00
[WIP] Add the ability to configure replications slots in Patroni (#398)
* Add the ability to configure replication slots in Patroni * Add debugging to Makefile for CDP builds
This commit is contained in:
@@ -36,11 +36,12 @@ type pgUser struct {
|
||||
}
|
||||
|
||||
type patroniDCS struct {
|
||||
TTL uint32 `json:"ttl,omitempty"`
|
||||
LoopWait uint32 `json:"loop_wait,omitempty"`
|
||||
RetryTimeout uint32 `json:"retry_timeout,omitempty"`
|
||||
MaximumLagOnFailover float32 `json:"maximum_lag_on_failover,omitempty"`
|
||||
PGBootstrapConfiguration map[string]interface{} `json:"postgresql,omitempty"`
|
||||
TTL uint32 `json:"ttl,omitempty"`
|
||||
LoopWait uint32 `json:"loop_wait,omitempty"`
|
||||
RetryTimeout uint32 `json:"retry_timeout,omitempty"`
|
||||
MaximumLagOnFailover float32 `json:"maximum_lag_on_failover,omitempty"`
|
||||
PGBootstrapConfiguration map[string]interface{} `json:"postgresql,omitempty"`
|
||||
ReplicationSlots map[string]map[string]string `json:"replication_slots,omitempty"`
|
||||
}
|
||||
|
||||
type pgBootstrap struct {
|
||||
@@ -215,6 +216,9 @@ PatroniInitDBParams:
|
||||
if patroni.TTL != 0 {
|
||||
config.Bootstrap.DCS.TTL = patroni.TTL
|
||||
}
|
||||
if patroni.ReplicationSlots != nil {
|
||||
config.Bootstrap.DCS.ReplicationSlots = patroni.ReplicationSlots
|
||||
}
|
||||
|
||||
config.PgLocalConfiguration = make(map[string]interface{})
|
||||
config.PgLocalConfiguration[patroniPGBinariesParameterName] = fmt.Sprintf(pgBinariesLocationTemplate, pg.PgVersion)
|
||||
|
||||
Reference in New Issue
Block a user