shayonj/pg_easy_replicate
60.9
Adequate · 20 September 2026
1.8k
lines of production code
Ruby
primary language
1
measurement over time
What this system is
PgEasyReplicate is a Ruby-based command-line tool designed to manage logical database replication and facilitate switchover between PostgreSQL instances. It provides capabilities for group-based replication orchestration, schema copying, and the tracking and application of DDL changes during data synchronization. The system also includes features for index optimization, status notifications, and comprehensive configuration validation to ensure reliable data consistency.
Features
Introduce DDL tracking, index optimization, and notification capabilities
PgEasyReplicate now supports tracking and applying DDL changes (schema modifications) during replication via the new \--track-ddl\ bootstrap option and \ddl\_audit\ module, allowing structural changes to be synchronized alongside data. The tool also adds an option to drop and recreate non-primary indices post-copy to reduce I/O and speed up data transfer, and introduces a \notify\ command to send replication status updates to a specified URL. Additionally, the CLI now supports AWS and GCP special superuser roles, allows excluding specific tables from sync, and provides a \--skip-vacuum-analyze\ flag for the switchover process.
_lib/pg\_easy\replicate · high confidence
New e2e-bootstrap and e2e-start scripts for testing pg\_easy\_replicate
Added \scripts/e2e-bootstrap.sh\ and \scripts/e2e-start.sh\ to automate end-to-end testing of the replication tool. The bootstrap script initializes a \pgbench\ database and runs \config\_check\ with the \--copy-schema\ flag. The start script orchestrates a full replication lifecycle: bootstrapping a cluster, starting sync with \--recreate-indices-post-copy\ and \--track-ddl\, applying a sample DDL change via \apply\_ddl\_change\, and performing a switchover. A \scripts/release.sh\ script was also added to build and push the gem to RubyGems and GitHub.
scripts · high confidence
Behavioural changes
Major refactoring of core replication logic and configuration validation
The library has been significantly restructured to improve reliability and feature support. The internal database communication layer has been migrated from the 'Secure' module to Sequel ORM, and the 'lockbox' dependency has been removed. Configuration validation is now more robust, explicitly checking for superuser privileges on both source and target databases and verifying that tables have appropriate replica identities. New capabilities include support for special user roles, the ability to copy schemas via pg\_dump, and the introduction of group-based management for replication tasks, alongside new modules for index management, orchestration, and DDL auditing.
lib · high confidence
Renamed console script and removed setup script
The bin/console script has been renamed to bin/pg\_easy\_replicate\_console to better reflect its purpose. Additionally, the bin/setup script has been removed entirely, eliminating the automated bundle install and other setup steps it previously performed.
bin · high confidence
Ruby 3.4 upgrade, Docker image rebuild, and CLI documentation overhaul
The tool now requires Ruby 3.0+ (with the Docker image and .ruby-version updated to 3.4.4) and uses a rebuilt Dockerfile that installs the gem via apt-based PostgreSQL client dependencies. The README has been significantly expanded to document new CLI capabilities including group-based replication, DDL change management, stats/notify commands, and special user roles for AWS/GCP, while the CHANGELOG.md file has been removed from the repository.
(repo-wide) · high confidence
Test coverage
Added comprehensive test coverage for pg\_easy\_replicate core components; Expanded test suite for smoke testing, configuration validation, and role management.
Dependencies
Major dependency overhaul and Ruby version bump
The gem has been upgraded to version 0.4.0, requiring Ruby 3.0 or higher. This release removes the \lockbox\ dependency and introduces \pg\_query\ and \Sequel\ as new runtime dependencies, while updating \pg\, \thor\, and \ougai\ to newer versions. Development dependencies for \rake\, \rspec\, and \rubocop\ have been relaxed to allow broader version ranges, and the gem's description has been updated to reflect its focus on logical replication and switchover capabilities.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 61.
Lenses
- Code Health 100
- Architecture 100
- Maturity 52
- Readiness 52
- Security 73
Changes since last survey
- 213 commits — 206 feature/other, 7 fixes
By area
- (root) — 140 commits
- lib/pg_easy_replicate — 37 commits
- .github/workflows — 12 commits
- spec/pg_easy_replicate — 8 commits
- lib/pg_easy_replicate.rb — 7 commits
- (repo) — 2 commits
- bin/release.sh — 2 commits
- spec/smoke_spec.rb — 2 commits
- .github/dependabot.yml — 1 commit
- bin/pg_easy_replicate_console — 1 commit
- spec/pg_easy_replicate_spec.rb — 1 commit
Notable commits
- fix: Extend config check to assert for REPLICA IDENTITY on tables and drop index bug fix (#89)
- fix: Fix console leaking into PATH (#13)
- fix: Fix tables check in config_check (#93)
- fix: Fix type/casing
- fix: Minor fixes and readme update
- fix: Typo fix: lot --> low (#6)
- fix: Update changelog typo fix note
- change: 0.1.0
- change: Accept push on tags
- change: Add a quick spec coverage in swap for exclude tables (#137)
- change: Add a test for upgrading pg 12 to 15 (#68)
- change: Add badges
- change: Add link
- change: Add mascot (#80)
- change: Add other crud functions on Group
- change: Add quote_identifier helper for SQL identifiers. (#40)
- change: Add schema
- change: Add smoke spec badge
- change: Add spec for skip_vacuum_analyze (#95)
- change: Add statement timeout to all queries by default
- …and 193 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
shayonj/pg_easy_replicate was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit d725ab2e6afd21a0bab1dd405f5fbefeab0a01b1 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.