# Postgres Operator Multi-Cluster auto failover

**URL:** <https://forums.percona.com/t/postgres-operator-multi-cluster-auto-failover/37109>\
**Category:** Percona Operator for PostgreSQL\
**Created:** [March 10, 2025, 10:43am UTC](https://forums.percona.com/t/postgres-operator-multi-cluster-auto-failover/37109 "2025-03-10T10:43:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iosifidd](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/iosifidd/32/20479_2.png) [@iosifidd](https://forums.percona.com/u/iosifidd)\
**Post date:** [March 10, 2025, 10:43am UTC](https://forums.percona.com/t/postgres-operator-multi-cluster-auto-failover/37109/1 "2025-03-10T10:43:03Z")

</div>

## Description:

Hello,  
we are evaluating using the Percona PostgreSQL operator for deploying PostgreSQL in an active-standby topology, needed for HighAvailability. I have seen the guide for achieving this:

> **[Percona Operator for PostgreSQL](https://docs.percona.com/percona-operator-for-postgresql/latest/)**
>
> The Percona Operator for PostgreSQL  
> automates the creation, modification, or deletion of items in your Percona
> Distribution for PostgreSQL environment. The Operator contains the necessary
> Kubernetes settings to maintain a consistent PostgreSQL...

but as i see, it is not possible to perform an automatic failover. Meaning, it is documented how to promote a standby cluster to active, but it is not clear what to do to the previous active cluster. There is also a reference on the documentation:

> **[Percona Operator for PostgreSQL](https://docs.percona.com/percona-operator-for-postgresql/latest/)**
>
> The Percona Operator for PostgreSQL  
> automates the creation, modification, or deletion of items in your Percona
> Distribution for PostgreSQL environment. The Operator contains the necessary
> Kubernetes settings to maintain a consistent PostgreSQL...

but it is quite vague.

Any advice?

Thank you!

---

<div class="post-metadata">

**Author:** ![Agustin\_G](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/agustin_g/32/14111_2.png) [@Agustin\_G](https://forums.percona.com/u/Agustin_G)\
**Post date:** [March 17, 2025, 9:10pm UTC](https://forums.percona.com/t/postgres-operator-multi-cluster-auto-failover/37109/2 "2025-03-17T21:10:36Z")

</div>

Hi @iosifidd,

The operator uses Patroni Standby cluster functionality, so its limitations apply here too. You can read more about it in the Patroni documentation:

> **[HA multi datacenter — Patroni 4.0.5 documentation](https://patroni.readthedocs.io/en/latest/ha_multi_dc.html)**

Once you do the standby cluster promotion, you need to make sure that no traffic is going to the previous primary cluster.

Regarding:

> Meaning, it is documented how to promote a standby cluster to active, but it is not clear what to do to the previous active cluster.

This will vary depending on each environment, and the steps needed are covered to some extent in the Patroni link above.  
This is also explained in the Percona operator documentation link:

> **[Percona Operator for PostgreSQL - Failover](https://docs.percona.com/percona-operator-for-postgresql/2.0/standby-failover.html)**
>
> In case of the Main site failure or in other cases, you can promote the standby cluster. The promotion effectively allows writing to the cluster. This creates a net effect of pushing Write Ahead Logs (WALs) to the pgBackrest repository. It might...

Lastly, you sent the same link twice, so I’m not sure what your second reference was pointing to.
