Skip to content

Commit

Permalink
feat: ⚡ Add postgresWalMaxSlotKeepSize parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
cmon33 committed Oct 9, 2024
1 parent 184c9e6 commit 780834a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/gitlab/templates/pg-cluster-gitlab.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
postgresql:
parameters:
max_worker_processes: "60"
{% if dsc.gitlab.postgresWalMaxSlotKeepSize is defined %}
max_slot_wal_keep_size: {{ dsc.gitlab.postgresWalMaxSlotKeepSize }}
{% endif %}
{% if dsc.gitlab.cnpg.mode == "primary" %}
pg_hba:
# To access through TCP/IP you will need to get username
Expand Down
3 changes: 3 additions & 0 deletions roles/harbor/templates/pg-cluster-harbor.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
postgresql:
parameters:
max_worker_processes: "60"
{% if dsc.harbor.postgresWalMaxSlotKeepSize is defined %}
max_slot_wal_keep_size: {{ dsc.harbor.postgresWalMaxSlotKeepSize }}
{% endif %}
{% if dsc.harbor.cnpg.mode == "primary" %}
pg_hba:
# To access through TCP/IP you will need to get username
Expand Down
3 changes: 3 additions & 0 deletions roles/keycloak/templates/pg-cluster-keycloak.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
postgresql:
parameters:
max_worker_processes: "60"
{% if dsc.keycloak.postgresWalMaxSlotKeepSize is defined %}
max_slot_wal_keep_size: {{ dsc.keycloak.postgresWalMaxSlotKeepSize }}
{% endif %}
{% if dsc.keycloak.cnpg.mode == "primary" %}
pg_hba:
# To access through TCP/IP you will need to get username
Expand Down
40 changes: 40 additions & 0 deletions roles/socle-config/files/crd-conf-dso.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down Expand Up @@ -301,6 +309,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down Expand Up @@ -763,6 +779,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down Expand Up @@ -899,6 +923,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down Expand Up @@ -1041,6 +1073,14 @@ spec:
description: Size for postgres data pvc.
type: string
default: 10Gi
postgresWalMaxSlotKeepSize:
description: |
Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
Default is -1, meaning that replication slots may retain an unlimited amount of WAL files.
You can for instance set it to "9GB".
See: https://cloudnative-pg.io/documentation/current/replication/#capping-the-wal-size-retained-for-replication-slots
Refer to postgresql.conf for memory units.
type: string
postgresWalPvcSize:
description: Size for postgres wal pvc (if value is not set then WAL files are stored within the data PVC).
type: string
Expand Down
3 changes: 3 additions & 0 deletions roles/sonarqube/templates/pg-cluster-sonar.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
postgresql:
parameters:
max_worker_processes: "60"
{% if dsc.sonarqube.postgresWalMaxSlotKeepSize is defined %}
max_slot_wal_keep_size: {{ dsc.sonarqube.postgresWalMaxSlotKeepSize }}
{% endif %}
{% if dsc.sonarqube.cnpg.mode == "primary" %}
pg_hba:
# To access through TCP/IP you will need to get username
Expand Down

0 comments on commit 780834a

Please sign in to comment.