Objective.
Kill the primary of a PostgreSQL database with a synchronous standby and measure the failover.
Scenario.
The primary was killed while a client wrote once a second.
Expected behaviour.
- Promote the synchronous standby within 2 minutes.
- Lose no acknowledged write.
Measured recovery.
- Recovery time RTO
- 6.2 s
- Target 2 min · met
- Recovery point RPO
- 0 s
- Every committed write kept.
- Database consistency
- Pass
Customer impact.
- Application availability
- Writes back after 6.2 s
- Data integrity
- Verified
- Committed data
- Fully preserved
What happened.
- Primary killed.
- Standby promoted; all 128 acknowledged writes present.
Correctness checks.
- Committed data
- Fully preserved
What we learned.
- Synchronous replication held every acknowledged write.
What we changed.
- No change needed.
Scope of this drill.
Measured with one database writing once a second.