← statichum.studio

Lightweight Pull-Request Postgres Branching For Self-Hosted And RDS Teams Who Don't Want To Migrate To Neon Just To Get Preview Databases

dev tool real project •• multiple requests

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.

builder note

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.

Neon branching Best-in-class branching, but you must run your Postgres on Neon. No path for AWS RDS, self-hosted, or Docker-Postgres teams to use this workflow without a full migration.
Supabase branching Available only on Supabase Pro tier, only works for Supabase-hosted projects. Same lock-in issue.
pgsh / pgbranch Open source, local-dev focused, no CI/CD integration story yet. Branch creation is essentially pg_dump + pg_restore, not copy-on-write... slow for prod-sized data.
Simplyblock Vela BYOC model, aimed at AWS/GCP/Azure managed-control-plane buyers. Not a tool a small team can drop into a GitHub Action.

sources (3)

other https://github.com/sastraxi/pgsh "Branch your PostgreSQL Database like Git" 2026-01-14
other https://github.com/le-vlad/pgbranch "Git style branching for local PostgreSQL" 2026-02-22
other https://www.blocksandfiles.com/block/2026/02/10/simplyblock-... "Simplyblock provides Postgres Git-style branching" 2026-02-10
postgresqlci-cdpreview-databasesdeveloper-workflowopen-source