If you're interested how it works (and how to possibly implement it by yourself), I wrote about the idea a few years ago. [1] To Postgres, recovering as a clone looks the same as if someone suddenly unplugged the computer power cable.<p>The shell script that implements the idea with LVM snapshots (relies on an existing Postgres physical replica) is not too long. It's used over SSH.<p><pre><code> $ wc -l /usr/local/bin/snapshot-*
164 /usr/local/bin/snapshot-create
16 /usr/local/bin/snapshot-drop
180 total
</code></pre>
Had this tool existed at the time, I'd have probably used it (monitoring and REST API might be handy). Still, the core idea can be implemented very easily.<p>[1]: <a href="https://www.sedlakovi.org/blog/2019/03/fast-postgres-snapshots.html" rel="nofollow">https://www.sedlakovi.org/blog/2019/03/fast-postgres-snapsho...</a>