Multi-version schemas
pgroll uses PostgreSQL views to present two versions of the schema simultaneously. Old clients keep working while new clients use the updated schema — no coordination required.
pgroll makes PostgreSQL schema changes safe by default. No table locks, instant rollbacks, and multi-version schema support — so old and new clients work simultaneously.
Traditional migration tools force trade-offs between safety and speed. pgroll eliminates that trade-off.
Table locking. ALTER TABLE commands can lock large tables for minutes or hours, blocking all reads and writes.
Deployment windows. Schema changes are risky enough that teams delay them to off-peak hours, slowing iteration.
Rollback complexity. Rolling back a migration typically means writing another migration. Under pressure, this goes wrong.
Online migrations. All schema changes are performed online. No table locks, no downtime, no maintenance windows.
Instant rollback. Rolling back means dropping views and temporary columns. One command, instant effect, no data loss.
Simple workflow. Old and new schemas are available simultaneously. No multi-step deployment choreography, no temporary compatibility code.
pgroll automates a proven pattern for safe schema evolution. Two schema versions coexist, giving you a graceful migration window.
pgroll uses PostgreSQL views to present two versions of the schema simultaneously. Old clients keep working while new clients use the updated schema — no coordination required.
Automates the expand-and-contract pattern. Hidden columns are added during expand, old columns dropped during contract. Complex multi-step migrations become a single operation.
Handles data conversion and backfills automatically. No one-time scripts, no manual data manipulation — pgroll manages the entire lifecycle of the migration.
Available via Homebrew, Go install, or prebuilt binaries. Single binary, no external dependencies.
Run pgroll init to set up the internal schema pgroll uses to manage migrations. Non-destructive — works with existing schemas.
Define your schema change as a JSON migration file. pgroll validates it before execution.
pgroll start creates the new schema version alongside the old one. Both are live and serving traffic.
When ready, pgroll complete drops the old version. Or pgroll rollback reverts instantly. Either way, zero downtime.
pgroll supports PostgreSQL 14.0 and later. Use it with AWS RDS, Aurora, GCP Cloud SQL, Azure Database, Supabase, Neon, or self-hosted instances.
6,300+ GitHub stars
Apache 2.0 license
Single Go binary
Postgres 14+