# pgoverlay

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

Source: https://talira.ai/catalog/pgoverlay-8z094v1s
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Infrastructure
- Categories: [databases / branching](https://talira.ai/categories/databases/branching), [developer tools / testing](https://talira.ai/categories/developer-tools/testing)
- Platforms: linux, macos, docker, kubernetes[^2]
- Licence: Apache-2.0[^1]
- Pricing: Free and open source[^1][^2]
- Free tier: yes[^1][^2]
- Self-hostable: yes[^2]
- API: yes[^2]
- Creator: Abdul Basit

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](https://talira.ai/catalog/docker-engine-9442r3nw.md) or [Kubernetes](https://talira.ai/catalog/kubernetes-ftsegx3m.md) ([Helm](https://talira.ai/catalog/helm-wvsxp6a4.md) chart, hostpath or CSI clones), for Postgres 14 to 18; it's a dev and test tool, and branch containers are privileged.

## Links

- GitHub: https://github.com/abd-ulbasit/pgoverlay
- Docs: https://github.com/abd-ulbasit/pgoverlay/tree/main/docs

## 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 API: plan not known
- Has a command line tool: plan not known
- Has official SDKs: plan not known
- Sends webhooks: plan not known

## Trust

Overall: 0.47 out of 1.
Signals: maintenance 1.00, adoption 0.06, momentum 0.03, community 0.12, backing 0.20, extensibility 0.60.

- last commit 8 days ago
- 278 commits in the last 90 days
- latest release v1.0.0 55 days ago
- 1 GitHub stars
- 1 contributors
- created by Abdul Basit

Warnings:

- young project (first commit 3 months ago)
- one or two maintainers (bus factor)

## Alternatives

- [db-branch](https://talira.ai/catalog/db-branch-590ypapk.md): Instant database branches for MySQL and PostgreSQL, on your own servers
- [DBLab Engine](https://talira.ai/catalog/dblab-engine-egf8da3j.md): Blazing-fast PostgreSQL cloning and branching for dev/test environments and CI
- [RiftDB](https://talira.ai/catalog/riftdb-dw0e3yr3.md): Instant, copy-on-write database branches for Postgres. Self-hosted. Every PR gets its own database.
- [Neon](https://talira.ai/catalog/neon-62ajbpbj.md): Serverless Postgres with branching, autoscaling and scale to zero
- [dbfork](https://talira.ai/catalog/dbfork-94t857ss.md): Fast local PostgreSQL database branching for migrations, schema testing, and isolated development workflows
- [pgbranch](https://talira.ai/catalog/pgbranch-jr3991d7.md): Git branching for your PostgreSQL database

## Sources

[^1]: https://github.com/abd-ulbasit/pgoverlay/blob/main/LICENSE (checked 17 Nov 2026)
[^2]: https://github.com/abd-ulbasit/pgoverlay (checked 17 Nov 2026)
