News for hackers. Stuff that matters.
Re:Thin PostgreSQL Clones by krab on Tuesday January 25, 2022 @08:16AM (#30071419)
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.

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.

    $ wc -l /usr/local/bin/snapshot-*
     164 /usr/local/bin/snapshot-create
      16 /usr/local/bin/snapshot-drop
     180 total
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.

[1]: https://www.sedlakovi.org/blog/2019/03/fast-postgres-snapsho...

There are no comments on this comment yet.