Getting ready

This recipe depends on the presence of the entire stack. Please complete all previous recipes in this chapter before continuing.

We also need a broken server. The easiest way to do this is to break it ourselves. Execute these commands on any system to simulate an unrecoverable server crash:

pkill -9 patroni
pkill -9 postgres
find /db/pgdata -name '*r*' -o  -name '*0*' -delete

Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.