Pg_branch: Pre-alpha Postgres extension brings Neon-like branching

pg_branch is a pre-alpha software that serves as an experimental proof-of-concept for creating “branches” of individual databases within a Postgres cluster using copy-on-write file systems like BTRFS. While Postgres makes it easy to create new empty databases, creating new databases from existing ones proves to be a challenge. The pg_branch extension solves this problem by giving CREATE DATABASE the power of snapshots. By utilizing a copy-on-write file system, pg_branch turns every CREATE DATABASE into an atomic file system snapshot that takes seconds instead of minutes or hours. This extension greatly improves performance and reduces disk usage. A series of steps are provided to guide users in installing and configuring pg_branch on a Linux system. The author also mentions future improvements such as distributing as pre-compiled extension and supporting additional copy-on-write file systems like ZFS and XFS. The project acknowledges inspiration from pgcow, Postgres.ai, and Heroku’s Database Fork feature.

https://github.com/NAlexPear/pg_branch

To top