postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

disable WAL archiving not work as indicated on administrator.md guide

Open mug3n451 opened this issue 2 years ago • 4 comments

  • Which image of the operator are you using? ghcr.io/zalando/spilo-15:2.1-p9
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? AWS EKS
  • Are you running Postgres Operator in production? [yes]
  • Type of issue? [Bug report]

From the doc Or you want to disable WAL archiving for a certain cluster by setting WAL_S3_BUCKET, WAL_GS_BUCKET or AZURE_STORAGE_ACCOUNT to an empty string.

My postgresql-cluster manifest:

apiVersion: "acid.zalan.do/v1"
kind: "postgresql"
metadata:
  name: "cl1-postgresql"
  namespace: "infra"
  labels:
    team: cl1
spec:
  env:
  - name: wal_s3_bucket
    value: ""
  dockerImage: ghcr.io/zalando/spilo-15:3.0-p1
  teamId: "cl1"
  postgresql:
    version: "12"
  numberOfInstances: 3
  volume:
    size: "20G"
    storageClass: "gp2"
  users:
    {}
  databases:
    {}
  resources:
    limits:
      cpu: 500m
      memory: 500Mi
    requests:
      cpu: 10m
      memory: 100Mi
  patroni:
    initdb:
      encoding: "UTF-8"
      locale: "en_US.UTF-8"
      data-checksums: "true"
    ttl: 30
    loop_wait: &loop_wait 10

I expect that WAL archive is disabled but it works and creates files in the local data filesystem under pg_wal directory.

mug3n451 avatar Jul 07 '23 11:07 mug3n451

To disable the archive mode, you have provide empty value in postgresql-operator-default-configuration.yaml file. https://github.com/zalando/postgres-operator/blob/master/manifests/postgresql-operator-default-configuration.yaml#L154

PGPAWAN avatar Jul 13 '23 05:07 PGPAWAN

is it the same if i set that value in the operator's values.yaml? Or i must use the postgresql-operator-default-configuration.yaml? thanks

mug3n451 avatar Jul 13 '23 12:07 mug3n451

Not sure, about operator's values.yaml but it will definitely work when you hv empty value in postgresql-operator-default-configuration.yaml.

PGPAWAN avatar Jul 18 '23 11:07 PGPAWAN

Most likely problem already fixed - same configuration disables WAL archiving on specific database while it turned on globally.

baznikin avatar Sep 29 '25 12:09 baznikin