talira

pgoverlay

Instant, writable copy-on-write branches of your real Postgres, self-hosted on plain Docker or Kubernetes. No ZFS required.

open sourceApache-2.0self-hostablefree

pgoverlay seeds once from any running Postgres and then creates isolated, writable branches, each a Postgres container whose data directory is an OverlayFS copy-on-write mount over the shared read-only seed: a 5 GiB database branches in under 2 seconds, and reads copy nothing. On XFS or btrfs a write copies only the changed blocks; on ext4 it copies the whole file it touches. The pgb CLI works on a laptop, branchd adds a REST API, a web UI and one Postgres port that routes dbname@branch to each branch, and a GitHub App creates a masked branch for every pull request. It runs on Docker or Kubernetes (Helm chart, hostpath or CSI clones), for Postgres 14 to 18; it's a dev and test tool, and branch containers are privileged.

Problems it solves

  • give every git worktree its own writable copy of our Postgres dev database without copying it
  • a database per pull request with a masked copy of production, created when the PR opens
  • branch a Postgres database on the Docker we already run, without setting up ZFS
  • every test should get its own isolated Postgres database instantly
  • see what a migration did to real data before merging it
  • throwaway production-shaped Postgres databases on my laptop
  • one Postgres port that routes connections to each branch by name
  • Neon-style branching we host ourselves on Kubernetes
  • reset a dev database back to its starting point after breaking it

Features

  • OverlayFS copy-on-write branches
  • block-level copies on XFS or btrfs
  • reset, diff and branch again
  • branchd: REST API, web UI and a Postgres router (dbname@branch)
  • scoped tokens and per-branch credentials
  • GitHub App: a branch per pull request
  • test helpers for Go and JS and a GitHub Action
  • Helm chart with hostpath or CSI clone modes
  • seeding with pg_basebackup or a dump

Capabilities

Has an APIplan not known
Has a command line toolplan not known
Has official SDKsplan not known
Sends webhooksplan not known

Alternatives

The same job

These do what pgoverlay does.

  1. db-branch Instant database branches for MySQL and PostgreSQL, on your own servers
  2. DBLab Engine Blazing-fast PostgreSQL cloning and branching for dev/test environments and CI
  3. RiftDB Instant, copy-on-write database branches for Postgres. Self-hosted. Every PR gets its own database.
  4. Neon Serverless Postgres with branching, autoscaling and scale to zero
  5. dbfork Fast local PostgreSQL database branching for migrations, schema testing, and isolated development workflows
  6. pgbranch Git branching for your PostgreSQL database

Compare pgoverlay with the top 3