feat: DBA diagnostic enhancements (PGC-90)#12
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds five new diagnostic capabilities to pgcrate:
dba stats-age- Detect tables with stale planner statisticsdba config- Configuration review with requires_restart indicatordba checkpoints- Checkpoint health analysisdba autovacuum-progress- Show running autovacuum operationsdba indexes- FK index detection (including composite keys)All commands support
--jsonoutput and follow the DiagnosticOutput envelope pattern.Changes
src/commands/pg_stat_checkpointerand renamed columnsrequires_restartfield and composite FK detectionTest plan
cargo fmt --checkpassescargo clippypasses (only pre-existing warnings)cargo test --test integrationpasses (149/149)