ankane/pgslice
63.6
Adequate · 20 September 2026
789
lines of production code
Ruby
primary language
1
measurement over time
What this system is
PgSlice is a command-line tool for managing PostgreSQL table partitioning, supporting both declarative and trigger-based strategies. It provides a suite of commands to prepare, fill, analyze, and swap partitioned tables, with specific enhancements for PostgreSQL 13+ features like automatic index inheritance and compression. The system is designed for robust CLI usage, featuring strict error handling, dry-run modes, and configurable batch processing for data migration tasks.
Behavioural changes
CLI commands refactored into separate files with improved partitioning support
The CLI commands (add\_partitions, analyze, fill, prep, swap, unprep, unswap) have been split into individual files for cleaner code organization. The prep command now supports declarative partitioning with Postgres 11+ features including automatic inheritance of indexes and foreign keys to the parent table, extended statistics, generated columns, and compression (Postgres 14+). The add\_partitions command now supports tablespace specification and properly handles foreign key definitions for Postgres versions below 11. The fill command now supports batch processing with configurable batch size, sleep intervals, and source/destination table options.
lib/pgslice/cli · high confidence
Improved interrupt handling in the CLI entry point
The pgslice executable now explicitly handles SIGINT signals by trapping them to abort the process immediately, replacing the previous behavior where Interrupt exceptions were silently ignored. This ensures that users receive immediate feedback and proper termination when canceling operations via keyboard interrupt.
exe · high confidence
PgSlice v0.7.2: Postgres 13+ requirement and CLI restructuring
The pgslice library has been updated to version 0.7.2, introducing a hard requirement for PostgreSQL 13 or later (dropping support for older versions) and restructuring the codebase by splitting the CLI, helpers, and table logic into separate modules. The CLI now uses Thor for command handling, supports a \--url\ option and \PGSLICE\_URL\ environment variable for database connections, and includes a \--dry-run\ mode to preview SQL statements without execution. The default connection timeout is set to 3 seconds, and the tool enforces strict exit-on-failure behavior for CLI commands.
lib/pgslice · high confidence
Test coverage
Added test support schema with sample data; Initial test suite for PgSlice CLI commands.
Dependencies
Removal of ActiveSupport dependency and code restructuring
The library has removed the \active\_support/all\ dependency, replacing its usage with standard Ruby features to reduce startup time and external dependencies. This change is accompanied by a significant refactoring of the \lib/pgslice.rb\ file, which has been reduced from 382 lines to 23 lines by moving command logic, helpers, and SQL generation into separate modules and files.
lib · high confidence
Updated gem dependencies and Ruby version requirements
The pgslice gem now requires Ruby 3 or higher and has updated its core dependencies: 'activesupport' has been replaced by 'thor', the 'pg' driver is now pinned to version 1 or greater, and 'cgi' has been added as a dependency. Development dependencies 'rake' and 'minitest' have been moved from the gemspec to the Gemfile.
(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 64.
Lenses
- Code Health 94
- Architecture 69
- Maturity 55
- Readiness 60
- Security 99
Changes since last survey
- 300 commits — 271 feature/other, 29 fixes
By area
- (root) — 144 commits
- lib/pgslice — 84 commits
- test/pgslice_test.rb — 47 commits
- .github/workflows — 14 commits
- lib/pgslice.rb — 7 commits
- exe/pgslice — 2 commits
- test/support — 2 commits
Notable commits
- fix: Fix sample output queries [skip ci] (#57)
- fix: Fix: uninitialized constant PgSlice::Table::SQL_FORMAT (#27)
- fix: Fixed CI
- fix: Fixed CI
- fix: Fixed CI
- fix: Fixed CI
- fix: Fixed CI
- fix: Fixed CI
- fix: Fixed DROP commands in docs - fixes #29
- fix: Fixed Docker warning [skip ci]
- fix: Fixed date test
- fix: Fixed error with pg 1.3 - fixes #40
- fix: Fixed flaky test
- fix: Fixed linter errors [skip ci]
- fix: Fixed nesting
- fix: Fixed repo on Travis
- fix: Fixed schema update instructions for Postgres 10 [skip ci]
- fix: Fixed sequence ownership
- fix: Fixed sequence query if sequence in different schema than table
- fix: Fixed style
- …and 280 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
ankane/pgslice 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 7c7447857549df409d718729a5d0c2d71d3c50bf — 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.