feat: Add dba wal diagnostic command, release v0.6.0#13
Merged
Conversation
- Built: dba wal diagnostic (src/commands/wal.rs) — WAL config, directory size, archiving status, generation rate, issue detection; JSON envelope with pgcrate.diagnostics.wal schema; capabilities wiring; integration tests - Fixed: check_function_access used query_one with LIMIT 0 (always 0 rows -> always errored -> diagnostics.wal capability always reported degraded); switched to query() so access detection is correct - Version 0.6.0 in Cargo.toml/Cargo.lock; added v0.6.0 CHANGELOG section - Validation: cargo fmt --check (pass), cargo clippy --all-targets (exit 0, no findings on touched files), cargo test --test integration (155 pass), wal+capabilities unit tests pass, dba wal/--json verified against live PG18 - Notes: plan's gotcha about an unused import in tests/diagnostics/wal.rs was stale (no such warning); pre-existing failures in doctor/role/extension/ timeout integration tests reproduce on clean main and are out of scope
- Fixed: CHANGELOG v0.6.0 referenced nonexistent 'pgcrate inspect capabilities'; corrected to 'pgcrate capabilities' - Noted: check_function_access is net-new code in this commit (not a repair of pre-existing code as the task framing implied); it correctly uses query() not query_one() — no LIMIT 0 trap remains in capabilities.rs - Noted: 18 pre-existing integration failures (doctor/extension/role/timeout) confirmed identical on main — environmental drift, out of scope
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.
Lands the WAL diagnostic work that sat uncommitted since January, prepping the v0.6.0 release.
What's in here
pgcrate dba wal— WAL health monitoring: config, directory size/segment count (pg_ls_waldir), archiving status, generation rate (pg_stat_wal, PG14+ with graceful fallback), issue detection with severity. JSON envelopepgcrate.diagnostics.wal+ schema file.diagnostics.walcapability with function-access probe (correct zero-rowquery()usage).Validation