pgroll
pgroll.com
- Free plan
- Open source
- Windows
- macOS
- Linux
- Self-hosted
What pgroll is
pgroll is an open-source command-line tool for PostgreSQL schema migrations that keeps applications working while changes are introduced. Its expand/contract workflow makes old and new schema versions available at the same time, with client applications choosing a version through PostgreSQL's search_path setting. The project describes migrations as zero-downtime and says it applies changes without locking the database. It can backfill columns when needed, and an active migration can be rolled back to the previous schema version. For breaking changes, pgroll creates virtual schemas from views over physical tables and uses triggers to carry writes across old and new columns. It supports PostgreSQL 14 and later, including RDS and Aurora services. ORM-generated SQL migrations can be converted, with examples for Alembic, Django, and Drizzle. The ORM guide notes that generated migrations may require manual up and down data migrations and consolidation of SQL statements. The project is free under Apache License 2.0 and runs on Linux, macOS, and Windows, or as a self-hosted tool.
Who it suits
pgroll suits developers and database teams managing PostgreSQL schema changes while client applications continue to run. Teams using PostgreSQL 14 row-level security should review the versioned-view limitation before choosing it.
Good to know, and what to watch
- Keeps old and new schema versions available during rollout.
- Can backfill columns and roll back active migrations.
- Supports PostgreSQL 14 and later, including RDS and Aurora.
- Available across Linux, macOS, and Windows.
- Free and licensed under Apache License 2.0.
- PostgreSQL 14 versioned views do not respect row-level security policies.
- ORM migrations may need manual data migrations and SQL consolidation.
Plans
Every plan and priceOpen source
Open-source
Open source
Getting started
- Visit https://pgroll.com/
- Install the single cross-platform binary on Linux, macOS, or Windows
- Connect pgroll to PostgreSQL 14 or later, including RDS or Aurora
- Create an expand/contract migration so old and new schemas coexist
- Configure client connections with PostgreSQL search_path to select a schema version
- Run the migration and use rollback when returning to the previous version is required
Limits to check
The Open-source plan is free at no cost and supports PostgreSQL 14.0 or later. On PostgreSQL 14, row-level security policies are not respected by pgroll’s versioned views, and ORM-generated migrations may require manual data migrations and SQL consolidation.
The verdict
pgroll provides a reversible migration workflow for PostgreSQL applications that need time to move between schema versions. Its PostgreSQL 14 RLS caveat and manual ORM migration work are important constraints to weigh.
Questions people ask
How much does pgroll cost?
The Open-source plan costs nothing and is open source.
Which platforms can run pgroll?
pgroll is available as a single cross-platform binary for Linux, macOS, and Windows, and it supports self-hosting.
Which PostgreSQL versions and services are supported?
pgroll supports PostgreSQL 14 and later and works with PostgreSQL services including RDS and Aurora.
Can an active migration be reversed?
Yes. An active migration can be rolled back to the previous schema version.
Does pgroll work with ORM-generated migrations?
It can convert SQL migration statements generated by Alembic, Django, and Drizzle. Generated migrations may need manual up and down data migrations, and SQL may need consolidation.
Where can users get support?
The project directs questions, issues, and feedback to GitHub Issues, GitHub Discussions, and its Discord server.
What the maker publishes
- Automatic backfills
- The tool backfills existing rows in batches when a migration requires data conversion. source
- Backfills
- pgroll automatically backfills columns when needed. source
- Benchmarks
- The project runs benchmarks across PostgreSQL 14 through 18 and measures backfill, trigger write amplification and schema reads. source
- Client configuration
- Client applications select a schema version by setting PostgreSQL's search_path when connecting. source
- Client integration
- Applications select a schema version by setting PostgreSQL search_path when connecting. source
- CLI installation
- Prebuilt binaries are offered for Linux, macOS and Windows, with source installation through go install. source
- Company founded
- LinkedIn lists Xata.io as founded in 2020. source
- Company headquarters
- LinkedIn lists Xata.io headquarters in San Francisco. source
- Company ownership
- LinkedIn describes Xata.io as privately held. source
- Company size
- LinkedIn lists Xata.io as having 11–50 employees. source
- Connection-leak fix
- Release 0.16.1 fixed connection leaks in the migration backfill process. source
- Database compatibility
- pgroll supports PostgreSQL versions 14 and later and says it works with any PostgreSQL service, including RDS and Aurora. source
- Documentation
- Documentation includes getting started material, tutorials, guides, examples and command references. source
- Downtime
- The project describes migrations as zero-downtime and says changes are applied without locking the database. source
- Existing databases
- A baseline command imports the structure of an already populated database before migrations begin. source
- Expand-contract workflow
- Migrations follow an expand-and-contract lifecycle, retaining compatibility until clients move to the new schema. source
- Homebrew architectures
- Homebrew bottles cover macOS Apple Silicon, macOS Intel and Linux ARM64 or x86_64. source
- Homebrew package
- Homebrew provides a pgroll formula with brew install pgroll. source
- Homebrew version
- The Homebrew page lists stable version 0.16.3. source
- 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. source
- Instant rollback
- Rollback removes the new schema version while leaving the previous version available. source
- Latest release
- Release 0.16.3 was published on September 8, 2026 and mainly updates dependencies and formatting. source
- License
- The repository identifies the project as licensed under Apache License 2.0. source
- License
- The repository is licensed under Apache License 2.0. source
Checked against the maker's pages on 15 Oct 2026.