This is the third post about running Jepsen against CloudNativePG. Earlier posts:
First: shout out to whoever first came up with Oracle Data Guard Protection Modes. Designing it to be explained as a choice between performance, availability and protection was a great idea.
Yesterday’s blog post described how the core of all data safety iscopies of the data, and the importance of efficient architectures to meet data safety requirements.
With Postgres, three-node clusters ensure the highest level of availability if one host fails. But two-node clusters are often worth the cost savings in exchange for a few seconds of unavailability during cluster reconfigurations. Similar to Oracle, Postgres two-node clusters can be configured to maximize performance or availability or protection.
Oracle Data Guard mode | Behavior | Patroni configuration | CloudNativePG configuration |
---|---|---|---|
Max Performance oracle default | Async; fastest commits; possible data loss on failover | patroni default | cnpg default |
Max Availability (NOAFFIRM) | Sync when standby available; acknowledge after standby write (not flush); if none available, don’t block | synchronous_mode: true synchronous_commit: remote_write | method: any number: 1 dataDurability: preferred synchronous_commit: remote_write |
Max Availability (AFFIRM) | Sync when standby available; acknowledge after standby flush; if none available, don’t block | synchronous_mode: true | method: any number: 1 dataDurability: preferred |
Max Protection | Always sync; if no sync standby, block commits (no data loss) | synchronous_mode: true synchronous_mode_strict: true | method: any number: 1 |
Automated failovers can involve a small amount of data loss with maximum performance and maximum availability configurations. With Oracle Fast-Start Failover, the FastStartFailoverLagLimit configuration property indicates the maximum amount of data loss that is permissible in order for an automatic failover to occur.
Theprevious blog post in this series compared CloudNativePG Max Performance and Max Protection modes. Now I want to take a look at Max Availability. In CloudNativePG, the key setting here is spec.postgresql.synchronous.dataDurability
. When dataDurability
is set to preferred
, the required number of synchronous instances adjusts based on the number of available standbys. PostgreSQL will attempt to replicate WAL records to the designated number of synchronous standbys, but write operations will continue even if fewer than the requested number of standbys are available.
All of these experiments were executed on my HP EliteBook (Ryzen Pro 5) with two CNPG Lab VMs via Hyper‑V and the tests ran in a loop for 12–24 hours to aggregate failure rates across the runs.
Continue reading→This is my personal website. The views expressed here are mine alone and may not reflect the views of my employer.I am currently looking for consulting and/or contracting work in the USA around the oracle database ecosystem.
contact:312-725-9249 orschneider @ ardentperf.com
Enter your email address to receive notifications of new posts by email.