Lightweight Pull-Request Postgres Branching For Self-Hosted And RDS Teams Who Don't Want To Migrate To Neon Just To Get Preview Databases
Neon and Supabase have made copy-on-write database branching standard for PR previews, but only if you live on their hosted platforms. Teams on AWS RDS, self-hosted Postgres, or even Postgres-in-a-Docker-container want the same workflow: 'this PR gets its own throwaway database seeded from prod, torn down when the PR closes.' Tools like pgsh, pgbranch, and Simplyblock Vela exist but are early, niche, or aimed at enterprise BYOC, leaving a real gap for a polished small-team tool that works against any Postgres.
The technical bet is whether you can get fast enough branches without copy-on-write storage underneath. ZFS dataset clones on the host work well for local dev but break for managed RDS. The pragmatic answer for RDS is logical replication into a thin clone using pg_replicate plus an aggressive cleanup hook on PR close. Sell it as a GitHub Action that emits a DATABASE_URL secret to your preview deploy.
landscape (4 existing solutions)
The branching workflow is owned by hosted Postgres vendors. OSS attempts exist but are early. There is room for a CLI + GitHub Action combo that uses Postgres's own logical replication, ZFS snapshots, or pg_compare to create fast PR-scoped branches against any Postgres.