Blazing-fast PostgreSQL cloning and branching for dev/test environments and CI
open coreApache-2.0self-hostablefree
DBLab Engine (Database Lab Engine) from Postgres.ai makes thin clones and branches of a PostgreSQL database with copy-on-write on ZFS (the default) or LVM: cloning a 1 TiB database takes about 10 seconds, and one machine can run dozens of independent clones. It keeps its copy of the data current from any Postgres, including RDS and Cloud SQL, by physical (WAL-G, pgBackRest, pg_basebackup) or logical (dump and restore) provisioning, and runs each clone in a Docker container. Clones can be reset, protected from deletion, auto-deleted and upgraded to a newer Postgres major in place. It has a UI, a REST API and a CLI, and GitLab uses it for SQL performance work.
Problems it solves
- give every developer a full-size copy of the production Postgres database without paying for the storage
- test our database migrations in CI against production-sized data
- a fresh copy of a 1 TB Postgres database in seconds for each pull request
- check how a slow query behaves on real data without running it on production
- copy-on-write clones of Postgres on our own servers instead of a cloud service
- our staging database is shared and people keep breaking each other's data
- thin clones of an RDS database for development
- reset a test database to a known snapshot after each run
- try a Postgres major version upgrade on a copy of production first
- dozens of database copies on one machine without dozens of times the disk
Features
- thin clones on ZFS or LVM
- branches and snapshots
- physical (WAL-G, pgBackRest) and logical provisioning
- continuous refresh from the source
- point-in-time recovery in physical mode
- reset, deletion protection and auto-deletion
- in-place major upgrade of one clone
- UI, REST API and CLI
- Prometheus metrics
- Postgres 10 to 18
Ways to run it
DBLab Community Edition
free1
Only in this edition
- the engine, UI, API and CLI
You arrange
- a Linux machine (an Ubuntu 22.04 VM) with Docker
- a ZFS pool or LVM volume for the clones
- access to the source database (a physical copy with pg_basebackup or a logical dump/restore)
DBLab Standard Edition
from $62/month
Only in this edition
- provisioning to any cloud or on-premises from the Postgres.ai Console
- also on AWS Marketplace
You arrange
- the cloud account or server it runs in
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
What people say
- Postgres.ai case study: GitLab uses DBLab for its SQL performance optimisation workflow source
Alternatives
The same job
These do what DBLab Engine does.
- Xata Open source, cloud native, Postgres platform with copy-on-write branching and scale-to-zero
- pgoverlay Instant, writable copy-on-write branches of your real Postgres, self-hosted on plain Docker or Kubernetes. No ZFS required.
- db-branch Instant database branches for MySQL and PostgreSQL, on your own servers
- Neon Serverless Postgres with branching, autoscaling and scale to zero
- dbfork Fast local PostgreSQL database branching for migrations, schema testing, and isolated development workflows
- RiftDB Instant, copy-on-write database branches for Postgres. Self-hosted. Every PR gets its own database.
