Skip to content

[Bug]: Postgres unavailability caused by scheduled backup failures #5505

Closed as not planned

Description

@rorynickolls-skyral

Is there an existing issue already for this bug?

  • I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

  • I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

  • I have read the troubleshooting guide and I think this is a new bug.

Contact Details

No response

Version

1.24.0

What version of Kubernetes are you using?

1.29

What is your Kubernetes environment?

Cloud: Google GKE

How did you install the operator?

Helm

What happened?

We have a few Postgres clusters managed by the CloudNativePG operator. These are configured with a nightly scheduled backup using volume snapshots.

We had a misconfiguration where the volume snapshot class used for the scheduled backups was not available on the cluster, and it caused an intermittent problem where memory usage of Postgres pods appeared to leak, eventually causing unavailability.

Example showing how this issue presents:

image

Restarting the pod or fixing the misconfiguration by using a valid volume snapshot class solves this issue but it is not desirable behaviour for failed backups to cause unavailability; Postgres should continue running normally when backups fail.

Cluster resource

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: openfga-postgres
  namespace: monitoring
  annotations:
    argocd.argoproj.io/sync-wave: "-2"
spec:
  backup:
    volumeSnapshot:
      className: missing-snapshot-class
  imageCatalogRef:
    apiGroup: postgresql.cnpg.io
    kind: ClusterImageCatalog
    major: 16
    name: postgresql
  imagePullSecrets:
  - name: image-pull-secret
  instances: 3
  monitoring:
    enablePodMonitor: true
  resources:
    limits:
      memory: 256Mi
    requests:
      cpu: 150m
      memory: 256Mi
  storage:
    size: 1Gi

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. dosubot commented on Apr 9, 2025

    @dosubot

    Hi, @rorynickolls-skyral. I'm Dosu, and I'm helping the cloudnative-pg team manage their backlog. I'm marking this issue as stale.

    Issue Summary

    • Reported bug in CloudNativePG version 1.24.0 related to misconfigured volume snapshot class.
    • Leads to memory leaks and Postgres unavailability in Kubernetes on Google GKE.
    • Temporary fixes include restarting the pod or correcting the snapshot class configuration.
    • Suggestion to improve handling of backup failures to prevent Postgres unavailability.
    • No additional comments or activities on the issue.

    Next Steps

    • Is this issue still relevant to the latest version of the cloudnative-pg repository? If so, please comment to keep the discussion open.
    • If there are no updates, the issue will be automatically closed in 7 days.

    Thank you for your understanding and contribution!

  2. github-actions commented on May 3, 2025

    @github-actions
    Contributor

    This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Staletriage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions