Skip to content

[Feature]: Increase the size of the managed cluster PVC even when it is full #11512

Open

Description

@LelouBil

Is there an existing issue already for this feature request/idea?

  • I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated.

What problem is this feature going to solve? Why should it be added?

When a PVC for a cluster becomes full, the cloudnative-pg operator simply stops interacting with it, and so changing the size requirements in the cluster CRD will not change the size requirement in the underlying PVC.

This requires two different manual interventions that could be only a single one.

  1. Expand the storage size of the full PVC
  2. Increase the size in the Cluster resource to the same value

The documentation page on Storage (https://cloudnative-pg.io/docs/1.30/storage#using-the-volume-expansion-kubernetes-feature) says this behavior is already happening in normal cases.

Why is it disabled in PVC-full scenarios ?

Describe the solution you'd like

Only have to increase the size in the Cluster CRD, and letting the operator propagate it to the PVC

Describe alternatives you've considered

Doing both of the manual actions

Additional context

No response

Backport?

N/A

Are you willing to actively contribute to this feature?

No

Code of Conduct

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

Activity

  1. added
    triage
    on Sep 20, 2026
  2. GellertBabel commented on Sep 26, 2026

    @GellertBabel
    Contributor

    Isn't this the same as #11341? There's a fix open in #11466.
    Could you share the exact reproduction? Which volume filled up, storage or walStorage?

  3. LelouBil commented on Sep 26, 2026

    @LelouBil
    Author

    Almost, it's the same issue but for the storage volume.

    Does the linked PR also fixes it for the spec.resources.requests.storage property ?

  4. LelouBil commented on Sep 26, 2026

    @LelouBil
    Author

    Also, I was hesitant in reporting it as a bug, and decided for a feature, because the documentation clearly says this isn't automated, so I assumed it was the stance of the project that this case would require manual PVC patching

    https://cloudnative-pg.io/docs/1.30/troubleshooting#storage-is-full

    Storage is full

    In case the storage is full, the PostgreSQL pods will not be able to write new data, or, in case of the disk containing the WAL segments being full, PostgreSQL will shut down.

    If you see messages in the logs about the disk being full, you should increase the size of the affected PVC. You can do this by editing the PVC and changing the spec.resources.requests.storage field. After that, you should also update the Cluster resource with the new size to apply the same change to all the pods. Please look at the "Volume expansion" section in the documentation.

    If the space for WAL segments is exhausted, the pod will be crash-looping and the cluster status will report Not enough disk space. Increasing the size in the PVC and then in the Cluster resource will solve the issue. See also the "Disk Full Failure" section

  5. GellertBabel commented on Sep 29, 2026

    @GellertBabel
    Contributor

    To my understanding this ticket isn't needed. The docs paragraph you quoted is generic manual guidance, not a statement that resize is disabled, only the WAL case has an actual guard short-circuiting reconciliation (ensureNoFailoverOnFullDisk, the one that reports Not enough disk space), and that's what #11466 fixes. For the data volume there's no such guard, so bumping spec.storage.size should already propagate while full.

    @LelouBil was your repro on storage specifically, and did the cluster report Not enough disk space? If resize really didn't happen there, that's a separate bug from #11341. Otherwise this is probably just a docs clarification.

  6. LelouBil commented on Sep 29, 2026

    @LelouBil
    Author

    I don't remember exactly, but I am sure that the Cluster object status showed something like "Not enough disk space". That's how I noticed, by reading its status.

    I bumped spec.storage.size, but it didn't do anything, and while I don't have the logs any more I also looked at the operator logs, and it seemed to say it wouldn't do anything until the cluster was not in the "not enough disk space" condition.

    And I had to manually resize the PVC for it to move forward

  7. mnozhaev commented on Sep 30, 2026

    @mnozhaev

    We hit this on 1.30.0 with a single-volume cluster (no walStorage): WAL archiving failed, pg_wal filled the 2Gi PVC,
    and after raising spec.storage.size to 5Gi the PVC stayed at 2Gi. ensureNoFailoverOnFullDisk returns before
    reconcileResources, so persistentvolumeclaim.Reconcile is never reached while the instance reports a full disk.
    Manual PVC patch was required. It would help if the fix in #11466 also covered the main storage PVC, not only walStorage.

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

Metadata

Metadata

Assignees

Labels

triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions