In this article, the author explains how to mirror redo logs in PostgreSQL using pg_receivewal with synchronous replication.