Skip to content

Commit

Permalink
Adjust Wal retain parameter values (#1349)
Browse files Browse the repository at this point in the history
Signed-off-by: souravbiswassanto <[email protected]>
  • Loading branch information
souravbiswassanto authored Nov 19, 2024
1 parent 8cc8608 commit fe1fbc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apis/kubedb/v1/postgres_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@ func (p *Postgres) SetDefaultReplicationMode(postgresVersion *catalog.PostgresVe
}
}
if p.Spec.Replication.WALLimitPolicy == WALKeepSegment && p.Spec.Replication.WalKeepSegment == nil {
p.Spec.Replication.WalKeepSegment = pointer.Int32P(160)
p.Spec.Replication.WalKeepSegment = pointer.Int32P(96)
}
if p.Spec.Replication.WALLimitPolicy == WALKeepSize && p.Spec.Replication.WalKeepSizeInMegaBytes == nil {
p.Spec.Replication.WalKeepSizeInMegaBytes = pointer.Int32P(2560)
p.Spec.Replication.WalKeepSizeInMegaBytes = pointer.Int32P(1536)
}
if p.Spec.Replication.WALLimitPolicy == ReplicationSlot && p.Spec.Replication.MaxSlotWALKeepSizeInMegaBytes == nil {
p.Spec.Replication.MaxSlotWALKeepSizeInMegaBytes = pointer.Int32P(-1)
Expand Down
4 changes: 2 additions & 2 deletions apis/kubedb/v1alpha2/postgres_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@ func (p *Postgres) SetDefaultReplicationMode(postgresVersion *catalog.PostgresVe
}
}
if p.Spec.Replication.WALLimitPolicy == WALKeepSegment && p.Spec.Replication.WalKeepSegment == nil {
p.Spec.Replication.WalKeepSegment = pointer.Int32P(64)
p.Spec.Replication.WalKeepSegment = pointer.Int32P(96)
}
if p.Spec.Replication.WALLimitPolicy == WALKeepSize && p.Spec.Replication.WalKeepSizeInMegaBytes == nil {
p.Spec.Replication.WalKeepSizeInMegaBytes = pointer.Int32P(1024)
p.Spec.Replication.WalKeepSizeInMegaBytes = pointer.Int32P(1536)
}
if p.Spec.Replication.WALLimitPolicy == ReplicationSlot && p.Spec.Replication.MaxSlotWALKeepSizeInMegaBytes == nil {
p.Spec.Replication.MaxSlotWALKeepSizeInMegaBytes = pointer.Int32P(-1)
Expand Down

0 comments on commit fe1fbc6

Please sign in to comment.