pgroll
pgroll is an open-source command-line tool for PostgreSQL schema migrations that lets old and new schema versions remain available while client applications …
What pgroll is
pgroll is an open-source command-line tool for PostgreSQL schema migrations that lets old and new schema versions remain available while client applications move between them. Its expand/contract workflow is intended to keep applications running during changes; the project describes migrations as zero-downtime and says they do not lock the database. Applications select a schema version by setting PostgreSQL's search_path when connecting. pgroll can backfill columns automatically and roll an active migration back to the previous schema version. For breaking changes, it creates virtual schemas from views over physical tables and uses triggers to carry writes between old and new columns. It supports PostgreSQL 14 and later, including RDS and Aurora, and ORM-generated SQL can be converted, with examples for Alembic, Django, and Drizzle. Generated migrations may still require manual up and down data migrations and consolidation of SQL statements. On PostgreSQL 14, versioned views do not respect row-level security policies, making pgroll a likely poor fit when using RLS on that version. It is licensed under Apache License 2.0.
Good
- Keeps old and new schema versions accessible
- Automatically backfills columns when needed
- Active migrations can be rolled back
- Works with PostgreSQL 14 and later
Watch out
- PostgreSQL 14 versioned views do not respect RLS policies
- ORM migrations may need manual data migrations
- ORM SQL may require manual consolidation
Who it suits
pgroll suits developers managing PostgreSQL schema changes who want old and new versions to coexist during application rollout. Teams using PostgreSQL 14 with row-level security should weigh its documented limitation.
Verdict
pgroll offers a reversible migration workflow with multiple schema versions available during client rollout. Its PostgreSQL 14 RLS caveat and manual work for some ORM migrations are important considerations.
Plans and prices
From pgroll's own pricing page, checked 15 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Open source | Free | PostgreSQL 14+ · Linux, macOS and Windows binaries · self-managed CLI |
| Open-source | Free | PostgreSQL 14.0 or later · single cross-platform binary |
The facts
Each one read from pgroll's own pages, with the date it was checked.
What it does
- Automatic backfills
- The tool backfills existing rows in batches when a migration requires data conversion.checked 15 Oct 2026
- Backfills
- pgroll automatically backfills columns when needed.checked 4 Oct 2026
- Benchmarks
- The project runs benchmarks across PostgreSQL 14 through 18 and measures backfill, trigger write amplification and schema reads.checked 15 Oct 2026
- Client configuration
- Client applications select a schema version by setting PostgreSQL's search_path when connecting.checked 4 Oct 2026
- Client integration
- Applications select a schema version by setting PostgreSQL search_path when connecting.checked 15 Oct 2026
- CLI installation
- Prebuilt binaries are offered for Linux, macOS and Windows, with source installation through go install.checked 15 Oct 2026
- Connection-leak fix
- Release 0.16.1 fixed connection leaks in the migration backfill process.checked 15 Oct 2026
- Database compatibility
- pgroll supports PostgreSQL versions 14 and later and says it works with any PostgreSQL service, including RDS and Aurora.checked 4 Oct 2026
- Documentation
- Documentation includes getting started material, tutorials, guides, examples and command references.checked 15 Oct 2026
- Downtime
- The project describes migrations as zero-downtime and says changes are applied without locking the database.checked 4 Oct 2026
- Existing databases
- A baseline command imports the structure of an already populated database before migrations begin.checked 15 Oct 2026
- Expand-contract workflow
- Migrations follow an expand-and-contract lifecycle, retaining compatibility until clients move to the new schema.checked 15 Oct 2026
- Homebrew architectures
- Homebrew bottles cover macOS Apple Silicon, macOS Intel and Linux ARM64 or x86_64.checked 15 Oct 2026
- Homebrew package
- Homebrew provides a pgroll formula with brew install pgroll.checked 15 Oct 2026
- Homebrew version
- The Homebrew page lists stable version 0.16.3.checked 15 Oct 2026
- How it works
- It creates virtual schemas using views over physical tables and uses triggers to propagate writes between old and new columns during breaking changes.checked 4 Oct 2026
- Instant rollback
- Rollback removes the new schema version while leaving the previous version available.checked 15 Oct 2026
- Latest release
- Release 0.16.3 was published on September 8, 2026 and mainly updates dependencies and formatting.checked 15 Oct 2026
- License
- The repository is licensed under Apache License 2.0.checked 15 Oct 2026
- Limit: JSON workflow
- Reddit commenters criticized the JSON migration DSL for verbosity, weak comments and awkward SQL mapping.checked 15 Oct 2026
The company
- Company founded
- LinkedIn lists Xata.io as founded in 2020.checked 15 Oct 2026
- Company headquarters
- LinkedIn lists Xata.io headquarters in San Francisco.checked 15 Oct 2026
- Company ownership
- LinkedIn describes Xata.io as privately held.checked 15 Oct 2026
- Company size
- LinkedIn lists Xata.io as having 11–50 employees.checked 15 Oct 2026
Alternatives to pgroll
- 1

Atlas
Free planOpen sourceWebAPILinuxmacOS8.3From $39 a month - 2
DeepFilterNet
Free planOpen sourceAPILinuxmacOSSelf-hosted7.6Free plan - 3

Skeema
Free planLinuxmacOSWindows6.9From $649 a year - 4

Bytebase Enterprise
Free planWebAPISelf-hosted6.8From $20 a month - 5
Sqitch
Free planLinuxmacOSSelf-hostedWindows6.7Free plan - 6
sqlx-cli
Free planLinuxmacOSWindows6.6Free plan
