Show HN: Go CLI to create instant PostgreSQL branches of your database github.com 2 points by rafaelquicdb a day ago
gkhartman a day ago Does this run on existing local postgres instances? The linked site seems to be a web service with a request access button. If it can be run without use of an external service, I'll give it a try. rafaelquicdb 10 hours ago It's tricky because it depends on the operating system.If you're on Linux, you can do it by:1) get a disk volume (partition, attach one, etc.)2) zpool that disk (note it will wipe it out)3) move your database data directory to the volume4) use zfs snapshot and zfs clone to create an isolated branch5) run pg_ctl start pointing to the clone directory.That's it!I tried to achieve the same on MacOS but it lacks proper tooling. Not sure about Windows.
rafaelquicdb 10 hours ago It's tricky because it depends on the operating system.If you're on Linux, you can do it by:1) get a disk volume (partition, attach one, etc.)2) zpool that disk (note it will wipe it out)3) move your database data directory to the volume4) use zfs snapshot and zfs clone to create an isolated branch5) run pg_ctl start pointing to the clone directory.That's it!I tried to achieve the same on MacOS but it lacks proper tooling. Not sure about Windows.
Does this run on existing local postgres instances? The linked site seems to be a web service with a request access button. If it can be run without use of an external service, I'll give it a try.
It's tricky because it depends on the operating system.
If you're on Linux, you can do it by:
1) get a disk volume (partition, attach one, etc.)
2) zpool that disk (note it will wipe it out)
3) move your database data directory to the volume
4) use zfs snapshot and zfs clone to create an isolated branch
5) run pg_ctl start pointing to the clone directory.
That's it!
I tried to achieve the same on MacOS but it lacks proper tooling. Not sure about Windows.
[dead]