Skip to content

feat: DBA diagnostic enhancements (PGC-90)#12

Merged
jackschultz merged 2 commits into
mainfrom
feature/dba-enhancements
Jan 22, 2026
Merged

feat: DBA diagnostic enhancements (PGC-90)#12
jackschultz merged 2 commits into
mainfrom
feature/dba-enhancements

Conversation

@jackschultz

Copy link
Copy Markdown
Owner

Summary

Adds five new diagnostic capabilities to pgcrate:

  • dba stats-age - Detect tables with stale planner statistics
  • dba config - Configuration review with requires_restart indicator
  • dba checkpoints - Checkpoint health analysis
  • dba autovacuum-progress - Show running autovacuum operations
  • Enhanced dba indexes - FK index detection (including composite keys)

All commands support --json output and follow the DiagnosticOutput envelope pattern.

Changes

  • New commands in src/commands/
  • PostgreSQL 17+ compatibility for pg_stat_checkpointer and renamed columns
  • Integration tests for all new commands
  • Tests for requires_restart field and composite FK detection

Test plan

  • All new commands tested locally against PostgreSQL 18
  • cargo fmt --check passes
  • cargo clippy passes (only pre-existing warnings)
  • cargo test --test integration passes (149/149)
  • Pre-existing doctor_integration failures are unrelated to this PR

- Add `dba stats-age` - detect stale planner statistics
- Add `dba config` - configuration review with requires_restart
- Add `dba checkpoints` - checkpoint health analysis
- Add `dba autovacuum-progress` - running vacuum operations
- Enhance `dba indexes` with FK index detection
- Fix checkpoints command for PG17+ (pg_stat_checkpointer view)
- Fix autovacuum-progress for PG17+ (num_dead_item_ids column)
- Add test for config requires_restart field
- Add tests for composite FK index detection
@jackschultz jackschultz merged commit 189bdeb into main Jan 22, 2026
8 checks passed
@jackschultz jackschultz deleted the feature/dba-enhancements branch January 22, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant