Skip to content

[Bug]: Old primary demotion stalls when its PostgreSQL is unresponsive, delaying failover completion #11348

Description

@leonardoce

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

[email protected]

Version

1.30.0

What version of Kubernetes are you using?

1.36

What is your Kubernetes environment?

Self-managed: kind (evaluation)

How did you install the operator?

YAML manifest

What happened?

During a failover/switchover, once the cluster's target primary has moved to another instance, the instance manager on the old primary is responsible for demoting it - shutting down its PostgreSQL so the instance stops acting as a primary.

The existing demotion path (reconcileOldPrimary) first attempts a checkpoint, then a "fast" shutdown, before falling back further. When the old primary's PostgreSQL is unresponsive both of those steps are doomed.

Because the failover isn't considered complete until the old primary is demoted, this stall extends the overall write-downtime window for the cluster.

Cluster resource

Relevant log output

Code of Conduct

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

Activity

  1. added
    bug 🐛
    triage
    on Aug 20, 2026
  2. added 3 commits that reference this issue on Sep 17, 2026
    c375472
    48425f2
    aefbab8
  3. added a commit that references this issue on Sep 17, 2026
    44edfd5
  4. removed
    triage
    on Sep 18, 2026
  5. added this to the 1.30.1 milestone on Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug 🐛

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions