Recovering systems after a major crash or outage is not an enjoyable experience. We must reboot or restore one or more servers, perform forensics to determine the root cause of the failure, and attempt to repair or replace corrupt data files.
This is no less true on systems that rely on Patroni as their high-availability solution. However, Patroni automates the more annoying portions of recovering a damaged PostgreSQL database.
This recipe will show how to recommission a previously damaged or offline PostgreSQL node within a Patroni cluster.