how to perform a manual failover with patroni without applying any outstanding WAL? - Mailing list pgsql-admin

From Zwettler Markus (OIZ)
Subject how to perform a manual failover with patroni without applying any outstanding WAL?
Date
Msg-id GV0P278MB0099FB151F771444A8893B488BA62@GV0P278MB0099.CHEP278.PROD.OUTLOOK.COM
Whole thread Raw
Responses Re: how to perform a manual failover with patroni without applying any outstanding WAL?
List pgsql-admin

We have a simple Patroni config (1 primary + 1 standby).

 

 

We configured the standby to run 3 hours behind the primary:

+ recovery_min_apply_delay: '3h'        # standby 3 hours behind

+ synchronous_mode: false                 # asynchron

 

 

In case there is a logical problem on the primary (wrong data processing, misleaded application upgrade,…) we want to perform a manual failover to the standby, which still contains the old, correct data status.

That means the standby should __not__ apply any more WALs within the 3 hour residue in the event of a manual failover.

 

 

When I tried a "patronictl failover" the standby first applied all outstanding WALs (which I don't want) and only then promoted the standby.

Any idea?

pgsql-admin by date:

Previous
From: Muhammad Ikram
Date:
Subject: Re: indexes on partitioned tables
Next
From: Muhammad Imtiaz
Date:
Subject: Re: how to perform a manual failover with patroni without applying any outstanding WAL?